org.riotfamily.cachius
Class CacheService

java.lang.Object
  extended by org.riotfamily.cachius.CacheService

public class CacheService
extends Object

Since:
6.5
Author:
Felix Gnass [fgnass at neteye dot de]

Constructor Summary
CacheService(Cache cache)
           
 
Method Summary
protected  Cache getCache()
           
 long getLastModified(CacheHandler handler)
           
 CachiusStatistics getStatistics()
           
 void handle(CacheHandler handler)
           
 void invalidateTaggedItems(String tag)
          Invalidates all items tagged with the given String.
 void setCheckInvolvedFiles(boolean checkInvolvedFiles)
           
 void setStaleUnlessExpired(boolean staleUnlessExpired)
          Sets whether cached data with a set expiration date should be served until it expires even if it has been invalidated.
 void setStaleWhileRevalidate(boolean staleWhileRevalidate)
          Sets whether stale data should be served during revalidation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheService

public CacheService(Cache cache)
Method Detail

getStatistics

public CachiusStatistics getStatistics()

getCache

protected Cache getCache()

setCheckInvolvedFiles

public void setCheckInvolvedFiles(boolean checkInvolvedFiles)

setStaleUnlessExpired

public void setStaleUnlessExpired(boolean staleUnlessExpired)
Sets whether cached data with a set expiration date should be served until it expires even if it has been invalidated.


setStaleWhileRevalidate

public void setStaleWhileRevalidate(boolean staleWhileRevalidate)
Sets whether stale data should be served during revalidation. If set to false concurrent threads will wait until the content has been updated. If set to true only the first thread has to wait while others will still see the old version.


invalidateTaggedItems

public void invalidateTaggedItems(String tag)
Invalidates all items tagged with the given String.


getLastModified

public long getLastModified(CacheHandler handler)

handle

public void handle(CacheHandler handler)
            throws Exception
Throws:
Exception