public class BinariesCache extends Object
BinaryPage
objects.Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_MAX_OBJECT_SIZE_BYTES |
static long |
DEFAULT_VALIDITY_CHECK_INTERVAL_MILLIS
Default validity check interval set to 3 minutes
|
Constructor and Description |
---|
BinariesCache(HstCache cache) |
Modifier and Type | Method and Description |
---|---|
void |
clearBlockingLock(BinaryPage page)
Deprecated.
deprecated since 2.26.00 Use
clearBlockingLock(String) instead. |
void |
clearBlockingLock(String resourcePathKey)
net.sf.ehcache.constructs.blocking.BlockingCache#get(Object) never releases its acquired lock
when the method throws an exception or returns null
until put(new Element(key, null)); to release the lock acquired. |
HstCache |
getHstCache() |
long |
getMaxObjectSizeBytes() |
BinaryPage |
getPageFromBlockingCache(String resourcePath) |
long |
getValidityCheckIntervalMillis() |
boolean |
isBinaryDataCacheable(BinaryPage page) |
boolean |
isPageStale(BinaryPage page,
long lastModified) |
boolean |
mustCheckValidity(BinaryPage page) |
void |
putPage(BinaryPage page) |
void |
removePage(BinaryPage page) |
void |
setHstCache(HstCache cache) |
void |
setMaxObjectSizeBytes(long maxObjectSizeBytes) |
void |
setValidityCheckIntervalMillis(long validityCheckIntervalSeconds) |
void |
updateNextValidityCheckTime(BinaryPage page) |
public static final long DEFAULT_MAX_OBJECT_SIZE_BYTES
public static final long DEFAULT_VALIDITY_CHECK_INTERVAL_MILLIS
public BinariesCache(HstCache cache)
public HstCache getHstCache()
public void setHstCache(HstCache cache)
public long getValidityCheckIntervalMillis()
public void setValidityCheckIntervalMillis(long validityCheckIntervalSeconds)
public long getMaxObjectSizeBytes()
public void setMaxObjectSizeBytes(long maxObjectSizeBytes)
public BinaryPage getPageFromBlockingCache(String resourcePath)
public void updateNextValidityCheckTime(BinaryPage page)
public void putPage(BinaryPage page)
@Deprecated public void clearBlockingLock(BinaryPage page)
clearBlockingLock(String)
instead.page
- public void clearBlockingLock(String resourcePathKey)
net.sf.ehcache.constructs.blocking.BlockingCache#get(Object)
never releases its acquired lock
when the method throws an exception or returns null
until put(new Element(key, null));
to release the lock acquired.
Therefore, the caller code is responsible for calling this method to release the acquired lock.resourcePathKey
- public void removePage(BinaryPage page)
public boolean isBinaryDataCacheable(BinaryPage page)
public boolean mustCheckValidity(BinaryPage page)
public boolean isPageStale(BinaryPage page, long lastModified)
Copyright © 2008-2013 Hippo B.V. (http://www.onehippo.com). All Rights Reserved.