Class CacheEntry
- java.lang.Object
-
- com.sun.appserv.web.taglibs.cache.CacheEntry
-
public class CacheEntry extends Object
Class responsible for caching and expiring the execution result of a JSP fragment.
-
-
Field Summary
Fields Modifier and Type Field Description static int
NO_TIMEOUT
-
Constructor Summary
Constructors Constructor Description CacheEntry(String response, int timeout)
Constructs a CacheEntry using the response string to be cached and the timeout after which the entry will expire
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
clear the contentsvoid
computeExpireTime(int timeout)
compute when this entry to be expired based on timeout relative to current time.String
getContent()
Gets the cached content.boolean
isValid()
is this response still valid?void
setExpireTime(long expireTime)
set the real expire time
-
-
-
Field Detail
-
NO_TIMEOUT
public static final int NO_TIMEOUT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CacheEntry
public CacheEntry(String response, int timeout)
Constructs a CacheEntry using the response string to be cached and the timeout after which the entry will expire
-
-
Method Detail
-
setExpireTime
public void setExpireTime(long expireTime)
set the real expire time- Parameters:
expireTime
- in milli seconds
-
getContent
public String getContent()
Gets the cached content.- Returns:
- The cached content
-
computeExpireTime
public void computeExpireTime(int timeout)
compute when this entry to be expired based on timeout relative to current time.- Parameters:
timeout
- in seconds
-
isValid
public boolean isValid()
is this response still valid?
-
clear
public void clear()
clear the contents
-
-