# Need to cache the hashtable

**URL:** <https://www.ruby-forum.com/t/need-to-cache-the-hashtable/134291>\
**Category:** Rails\
**Created:** [April 9, 2008, 4:22pm UTC](https://www.ruby-forum.com/t/need-to-cache-the-hashtable/134291 "2008-04-09T16:22:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![srikanth\_u37](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@srikanth\_u37](https://www.ruby-forum.com/u/srikanth_u37)\
**Post date:** [April 9, 2008, 4:22pm UTC](https://www.ruby-forum.com/t/need-to-cache-the-hashtable/134291/1 "2008-04-09T16:22:18Z")

</div>

Hi,

I have to cache the hashtable which contains array of objects. I cannot  
store it in session because the data it contains may be huge sometimes.  
Can any one please help which is the best way to store the hashtable (i  
thought its in cache) where i can use the data on different pages

ThanX in advance

---

<div class="post-metadata">

**Author:** ![srikanth\_u37](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@srikanth\_u37](https://www.ruby-forum.com/u/srikanth_u37)\
**Post date:** [April 9, 2008, 7:00pm UTC](https://www.ruby-forum.com/t/need-to-cache-the-hashtable/134291/2 "2008-04-09T19:00:45Z")

</div>

Srikanth Gop wrote:

> Hi,
> 
> I have to cache the hashtable which contains array of objects. I cannot  
> store it in session because the data it contains may be huge sometimes.  
> Can any one please help which is the best way to store the hashtable (i  
> thought its in cache) where i can use the data on different pages

Are you using ActiveRecordStore for your sessions? I don’t think there’s  
a real limit to the size of what you can put into a database session. If  
anyone knows differently please chime in.

---

<div class="post-metadata">

**Author:** ![srikanth\_u37](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@srikanth\_u37](https://www.ruby-forum.com/u/srikanth_u37)\
**Post date:** [April 10, 2008, 5:06am UTC](https://www.ruby-forum.com/t/need-to-cache-the-hashtable/134291/3 "2008-04-10T05:06:48Z")

</div>

Daniel W. wrote:

> Are you using ActiveRecordStore for your sessions? I don’t think there’s  
> a real limit to the size of what you can put into a database session. If  
> anyone knows differently please chime in.

Hi Daniel,

Thanx for the reply, i am not using activerecordrestore for the sessions  
and anyways for the current implementation i cannot use sessios because  
as the data is common for all the users and should be vailable for the  
whole application.
