com.bowstreet.webapp.util
Class CacheControl

java.lang.Object
  extended by com.bowstreet.webapp.util.CacheControl

public class CacheControl
extends java.lang.Object

Class to hold cache information for a Page, Method or Action List. This is used to enable or disable output caching.


Constructor Summary
CacheControl(long timeLimit, boolean browserDependent)
          Construct from the specified values.
 
Method Summary
 boolean getBrowserDependent()
          Gets the browser dependency
 java.lang.String getCacheKeyMethod()
          Gets the cache key method name.
 long getTimeLimit()
          Gets caching time limit - 0 means no caching.
 void setBrowserDependent(boolean browserDependent)
          Sets the browser dependency
 void setCacheKeyMethod(java.lang.String cacheKeyMethod)
          Sets the cache key method name.
 void setTimeLimit(long time)
          Sets the time limit - 0 means don't cache
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheControl

public CacheControl(long timeLimit,
                    boolean browserDependent)
Construct from the specified values.

Parameters:
timeLimit - The length of time in milliseconds, which this entry is valid for.
browserDependent - true if Browser type should create a separate cache entry, false to ignore Browser type.
Method Detail

getBrowserDependent

public boolean getBrowserDependent()
Gets the browser dependency

Returns:
true if Browser type should create a separate cache entry, false to ignore Browser type.

getCacheKeyMethod

public java.lang.String getCacheKeyMethod()
Gets the cache key method name.

Returns:
The name of the generated method to call in the model that builds the cache key using the specified actions (from the builder).

getTimeLimit

public long getTimeLimit()
Gets caching time limit - 0 means no caching.

Returns:
The length of time in milliseconds, which this entry is valid for. 0 means no caching.

setBrowserDependent

public void setBrowserDependent(boolean browserDependent)
Sets the browser dependency

Parameters:
browserDependent - true if Browser type should create a separate cache entry, false to ignore Browser type.

setCacheKeyMethod

public void setCacheKeyMethod(java.lang.String cacheKeyMethod)
Sets the cache key method name.

Parameters:
cacheKeyMethod - The name of the generated method to call in the model that builds the cache key using the specified actions (from the builder).

setTimeLimit

public void setTimeLimit(long time)
Sets the time limit - 0 means don't cache

Parameters:
time - The length of time in milliseconds, which this entry is valid for. 0 means don't cache


Copyright © 2009 IBM. All Rights Reserved.