[Opensymphony-oscache] OsCache Refresh
Kavita <[email protected]> Thu, 14 Apr 2005 13:17:49 CDT
| Newsgroups | gmane.comp.java.open-symphony.os-cache |
|---|---|
| Message-ID | <30371434.1113502748208.JavaMail.os-j2ee@opensymphony01.contegix.com> |
Thanks, but this raises another question. How does a REFRESH INTERVAL differ from a CRON EXPRESSION. How can cron expression it be used to do an AUTOMATIC refresh? e.g.: @ 10 AM, i pulled some data from database, created a object (List) & stored it in the cache - using GeneralCacheAdministrator.putInCache method. Whenever users ask for this data, its fetched from the cache - using GeneralCacheAdministrator.getFromCache() method. What I need is - Whether or not user asks for data, the data should get refreshed in the cache - for this I may set the refresh period of 30 mins. How can a cron expression help me with this? No matter what, to get data from cache, I have to call the GeneralCacheAdministrator.getFromCache() method with keyName & either refreshInterval &/or cron expression. The functioanlity I am looking for is something like a "Background Thread" which checks if the data is stale & refreshes it. Is this readily available in OSCache? --------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=1575&messageID=4844#4844