jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Fuller <joshful...@gmail.com>
Subject Re: Limiting Disk Cache Size?
Date Tue, 20 Sep 2005 16:39:56 GMT
Thanks for your quick response and help. So would you recommend setting up 
multiple disk cache, and using the MaxKeySize value to limit it? Or is your 
last statement saying that the MaxKeySize will not actually limit the size 
of objects on the disk anyway, but only the number of keys in memory? So to 
clarify, if I have a database of 100,000 records that are heavily used - and 
I have a cache setup with a MaxKeySize of 1,000 - then there is nothing 
preventing all 100,000 records from being spooled to disk as long as they 
have yet to expire?

A follow-up question to that would be - Does the memory shrinker thread get 
used also to clean up the disk cache items that may have expired, or how do 
they get cleaned out?

Thanks,
Josh Fuller

On 9/20/05, Smuts, Aaron <Aaron.Smuts@travelocity.com> wrote:
> 
> You can only limit the number of keys, not the size of the file. The
> disk cache keeps track of empty spots from where an item has been
> removed and it tries to reuse them, but this doesn't stop it from
> growing indefinitely if you keep putting larger and larger items on
> disk. I don't think that the disk cache marks a spot as available when
> a key is spooled off the disk cache key lru. . . .
> 
> > -----Original Message-----
> > From: Joshua Fuller [mailto:joshfuller@gmail.com]
> > Sent: Monday, September 19, 2005 9:07 PM
> > To: jcs-users@jakarta.apache.org
> > Subject: Fwd: Limiting Disk Cache Size?
> >
> > Sorry, if this is a repeat - the last email didnt seem to send so I'm
> > trying
> > again......
> >
> > Is there a way to limit the size of the items in the cache being
> stored to
> > disk for a given region, or even globally? I can't find any setting
> > anywhere
> > that limits the size of the files on disk (by number of elements or
> > physical).
> >
> > Thanks,
> > Josh Fuller
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message