[infinispan-dev] Expiration element of LevelDB cache store redundant?
Martin Gencur
mgencur at redhat.com
Wed Sep 11 05:34:44 EDT 2013
Hi,
let's look at configuration of LevelDB in Infinispan Server:
https://gist.github.com/mgencur/6520948
After investigating what the <expiration> configuration element is good
for, I think it's an implementation detail and should be removed.
Every time a mortal entry is stored in the cache, it's put (in internal
format of the cache store - ExpiryEntry) in an expiryEntryQueue whose
size is specified in the configuration through "queue-size" attribute.
The path attribute (location of dbExpired) is only used when purge() is
called on the cache store. At that moment, all entries that are in the
expiryEntryQueue are flushed into dbExpired (location specified through
"path"), all the elements from dbExpired are read and if they have
expiry time shorter than current time, they are removed from the primary
cache store's location, i.e. they are purged.
IMO, the location where intermediate (ExpiryEntry) are stored is an
implementation (users don't have access to it anyway) detail and the
queue-size attribute is a black-box users will never know how to set it.
I would suggest hiding these implementation details and simplify the
configuration. There are way too many configuration elements already.
WDYT?
Thanks
Martin
More information about the infinispan-dev
mailing list