jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Golubock" <sco...@ZAAZ.com>
Subject JCS question
Date Thu, 06 Jul 2006 00:38:24 GMT
i'd like to write some custom code that gets executed after an object
exceeds its max life in the cache, and is ultimately responsible for
deciding whether or not the object actually gets removed from cache.
this code might decide to keep an object in cache even after it has
expired (reset its max life period).
i know i can register event handlers for various timeout events, but
don't see anything that lets me do anything before the object is
actually removed.
any thoughts on if this is possible, or how i could accomplish it?
here is more information about my specific use case, in case there are
other ideas:
i have an application that retrieves data from a remote system and
caches it for a period of time.  the application checks the cache first,
and if the data isn't there (after a timeout for example) it will goto
the remote system.  unfortunately, the remote system is flaky and
frequently unavailable.  so, i'd like to write some code that pings the
remote system before the cache is reset, so that cached data can be
saved longer if the remote system is down.
another solution may be to configure JCS so that the cache never
expires, and write my own code that runs as a background thread and
manually resets the JCS cache when necessary, ie:
but this feels hacky to me for some reason.  it seems like i may be able
to extend or override something in JCS to achieve this.
thanks in advance ...

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