org.riotfamily.cachius
Class CacheFactory
java.lang.Object
org.riotfamily.cachius.CacheFactory
- Direct Known Subclasses:
- CacheFactoryBean
public class CacheFactory
- extends Object
- Since:
- 6.5
- Author:
- Felix Gnass [fgnass at neteye dot de]
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_CAPACITY
public static final int DEFAULT_CAPACITY
- See Also:
- Constant Field Values
DEFAULT_CACHE_DIR_NAME
public static final String DEFAULT_CACHE_DIR_NAME
- See Also:
- Constant Field Values
CacheFactory
public CacheFactory()
setCapacity
public void setCapacity(int capacity)
- Sets the capacity of the Cache. If not set, the capacity will default
to
DEFAULT_CAPACITY
(10000).
setCacheDir
public void setCacheDir(File cacheDir)
getCacheDir
protected File getCacheDir()
setRestore
public void setRestore(boolean restore)
- Sets whether the factory should try to restore a previously persisted
version of the cache. Default is
true
.
isRestore
public boolean isRestore()
setEnabled
public void setEnabled(boolean enabled)
createInstance
public Cache createInstance()
throws Exception
- Throws:
Exception
persist
protected void persist(Cache cache)
deserialize
protected Cache deserialize(File f)