[Opensymphony-oscache] How to Inspect Cache Entry?

jz <[email protected]> Tue, 30 Aug 2005 22:11:38 CDT
Newsgroups gmane.comp.java.open-symphony.os-cache
Message-ID <2986264.1125458367694.JavaMail.os-j2ee@opensymphony01.contegix.com>
Hi,

We have an external content management system, which tells us when a piece of content is last modified.  So we must ensure that its cached version be expired when that happened.

However, CacheEntry instance is nowhere to be obtained since Cache.getCacheEntry() is a protected method, so I cannot run CacheEntry.getLastUpdate() externally.

There is no provision in OSCache to take an absolute expiration moment in additional to the cron expression.  Right now, it only takes a longivity period instead.  Since I have no way to know the creation date of a cache entry, this is of much help.

Our content metadata also has a cron expression that is used as an alternate cache expiration policy, so I cannot overwrite that, since I need both conditions to be tested against.

Ideally, I think we need to expose APIs so as to allow external inspection of cache entries such as their creation and last update time.

How can this problem be approached?

JZ

---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=6275&messageID=14185#14185