jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "AJ Weber" <awe...@comcast.net>
Subject Newbie: persistent/non-persistent and other quickies!
Date Fri, 02 Feb 2007 17:52:03 GMT
Obvious Newbie Q's.  Please forgive my initial ignorance...these are all non-distributed questions...

  1.. Is there a way to use the memory cache with the "IndexedDisk" as a backup/backing-store,
such that on shutdown (or on next startup/initialization) the disk cache is entirely "flushed".
 That is, everything is marked stale or deleted, etc.?
  2.. Can you programmatically setup the entire cache (memory and disk, etc.) from within
your code so you theoretically eliminate the ccf-file entirely?  Just wondering...not sure
it's a great idea or not....
  3.. I understand the cache works (solely?) on the "max number of objects" you want in the
different parts of the cache (max-in-memory and max-on-disk).  What if your object sizes will
vary _drastically_?  How can we limit the in-memory portion to a specific number of bytes?
 For example, a ByteBuffer (mapped and read-into mem from a FileChannel) for a cached file?
 Could be 10k, could be 100M each, entirely dependent upon filesize.  I could get an OutOfMemory
exception pretty fast if my average file size calc is skewed or it changes over time.  (I
think I saw someone else ask this, but I want to know if anyone else has ideas on how to get
this to work.)
  4.. Has anyone done anything similar?  Read-in files that need quick random-access to a
ByteBuffer or byte[] and used the JCS to cache them?  Experiences and gotchas' to share possibly?
Thank you all in advance,

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