public class ProxyCache extends AbstractProxyCache
| Constructor and Description |
|---|
ProxyCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the cache.
|
FilterChain |
createFilterChain(FilterChain next,
WebApp app)
Creates the filter.
|
com.caucho.server.httpcache.ProxyCacheInode |
createInode()
Creates a new writing inode.
|
void |
destroy()
Closes the cache.
|
CacheItem[] |
getCacheableEntries(int max)
Return most used connections.
|
CacheItem[] |
getCachedEntries(int max)
Return most used connections.
|
long |
getHitCount()
Returns the hit count.
|
static ProxyCache |
getLocalCache()
Returns the local cache.
|
int |
getMaxEntrySize()
Sets the maximum entry size for cache values.
|
long |
getMemoryBlockHitCount()
Returns the block hit count.
|
long |
getMemoryBlockMissCount()
Returns the miss count.
|
long |
getMissCount()
Returns the miss count.
|
Path |
getPath()
Returns the path from the cache directory.
|
CacheItem[] |
getUncacheableEntries(int max)
Return most used connections.
|
CacheItem[] |
getUncachedEntries(int max)
Return most used connections.
|
void |
init()
Initialize the cache.
|
boolean |
isEnable()
Return true if enabled.
|
boolean |
isEnableRange()
True if range handling is enabled.
|
boolean |
isRewriteVaryAsPrivate()
True if Vary headers should be rewritten as Cache-Control: private to
work around IE's Vary handling bug.
|
void |
setDir(Path path)
Sets the path to the cache directory (backwards compatibility).
|
void |
setDiskSize(Bytes size)
Sets the disk size of the cache
|
void |
setEnable(boolean isEnabled)
Set true if enabled.
|
void |
setEnableMmap(boolean isEnable) |
void |
setEnableRange(boolean enableRange)
True if range handling is enabled.
|
void |
setMaxEntrySize(Bytes size)
Sets the maximum entry size for cache values.
|
void |
setMemorySize(Bytes size)
Sets the memory size of the cache
|
void |
setPath(Path path)
Sets the path to the cache directory.
|
void |
setRewriteVaryAsPrivate(boolean rewrite)
True if Vary headers should be rewritten as Cache-Control: private to
work around IE's Vary handling bug.
|
void |
setSize(Bytes size)
Sets the size of the the cache (backwards compatibility).
|
getEntries, setEntriespublic ProxyCache()
throws ConfigException
ConfigExceptionpublic static ProxyCache getLocalCache()
public void setPath(Path path)
setPath in class AbstractProxyCachepublic Path getPath()
getPath in class AbstractProxyCachepublic void setMemorySize(Bytes size)
setMemorySize in class AbstractProxyCachepublic void setDiskSize(Bytes size)
setDiskSize in class AbstractProxyCache@Configurable public void setEnableMmap(boolean isEnable)
setEnableMmap in class AbstractProxyCachepublic void setMaxEntrySize(Bytes size)
public int getMaxEntrySize()
getMaxEntrySize in class AbstractProxyCachepublic void setEnable(boolean isEnabled)
setEnable in class AbstractProxyCachepublic boolean isEnable()
isEnable in class AbstractProxyCachepublic void setDir(Path path)
setDir in class AbstractProxyCachepublic void setSize(Bytes size)
setSize in class AbstractProxyCachepublic void setEnableRange(boolean enableRange)
public boolean isEnableRange()
public void setRewriteVaryAsPrivate(boolean rewrite)
setRewriteVaryAsPrivate in class AbstractProxyCachepublic boolean isRewriteVaryAsPrivate()
@PostConstruct public void init() throws ConfigException, java.io.IOException, java.sql.SQLException
ConfigExceptionjava.io.IOExceptionjava.sql.SQLExceptionpublic FilterChain createFilterChain(FilterChain next, WebApp app)
createFilterChain in class AbstractProxyCachepublic void clear()
clear in class AbstractProxyCachepublic com.caucho.server.httpcache.ProxyCacheInode createInode()
public long getHitCount()
getHitCount in class AbstractProxyCachepublic long getMissCount()
getMissCount in class AbstractProxyCachepublic long getMemoryBlockHitCount()
getMemoryBlockHitCount in class AbstractProxyCachepublic long getMemoryBlockMissCount()
getMemoryBlockMissCount in class AbstractProxyCachepublic CacheItem[] getCacheableEntries(int max)
public CacheItem[] getUncacheableEntries(int max)
public CacheItem[] getCachedEntries(int max)
public CacheItem[] getUncachedEntries(int max)
public void destroy()