Methods Summary |
---|
public void | clear()clear the contents
content = null;
expireTime = 0L;
|
public void | computeExpireTime(int timeout)compute when this entry to be expired based on timeout relative to
current time.
// timeout is relative to current time
this.expireTime = (timeout == NO_TIMEOUT) ? timeout :
System.currentTimeMillis() + (timeout * 1000);
|
public java.lang.String | getContent()Gets the cached content.
return this.content;
|
public boolean | isValid()is this response still valid?
return (expireTime > System.currentTimeMillis() ||
expireTime == NO_TIMEOUT);
|
public void | setExpireTime(long expireTime)set the real expire time
this.expireTime = expireTime;
|