Subcache not allowed to have a different expire time?

2 views
Skip to first unread message

Cory Watson

unread,
Dec 22, 2009, 4:53:56 PM12/22/09
to perl-cach...@googlegroups.com
I was considering using a subcache to wrap a CHI instance (wherein the
"root" cache is a Redis cache) and was considering using a memory
cache to further mitigate the overhead of connecting to Redis. It
seems you cannot use a different expiration time for a subcache. Why
does this limitation exist? Since it is explicitly set ("List of
parameters that cannot be overriden in a subcache") I'm assuming that
it's there for a good reason. ;)

--
Cory 'G' Watson
http://www.onemogin.com

Jonathan Swartz

unread,
Dec 28, 2009, 11:22:45 AM12/28/09
to Perl-Cache Discuss
Hi Cory,

For efficiency, we want to create a single CHI::CacheObject (with the
embedded expiration information) and store it in both cache backends.

At some point we could conceivably add code that will use either a
single CacheObject or separate CacheObjects automatically, and thus
allow these parameters to be overriden. But that requires checking for
all differences that might necessitate needing a separate CacheObject.
Patches welcome. :)

In the meantime I've added this to the docs for the next release.

Best
Jon

Reply all
Reply to author
Forward
0 new messages