
Classes | |
| interface | Cacheable |
| interface | Policy |
Public Member Functions | |
| boolean | actionNameIsCachableForClass (Class actionClass, String actionName) |
| WOResponse | cachedResponseForRequest (Class actionClass, String actionName, WORequest request) |
| void | cacheResponseForRequest (Class actionClass, String actionName, WORequest request, WOResponse response) |
| ERXWOResponseCache () | |
| void | flushCache () |
| boolean | hasPolicy () |
| boolean | isEnabled () |
| Policy | policy () |
| void | setIsEnabled (boolean enabled) |
| void | setPolicy (Policy policy) |
Static Public Member Functions | |
| static ERXWOResponseCache | sharedInstance () |
Static Public Attributes | |
| static String | NO_CACHE_KEY = "ERXDirectActionRequestHandler.DontCache" |
Protected Attributes | |
| Map | cache |
| Boolean | isEnabled |
| Policy | policy |
Static Protected Attributes | |
| static ERXWOResponseCache | sharedInstance |
public class DirectAction extends WODirectAction implements ERXWOResponseCache.Cacheable {
static {
ERXWOResponseCacheKeyPolicy.sharedInstance().createPolicyEntryForClass(DirectAction.class,
new NSArray(new Object[] {"default", "cached"}),
NSArray.EmptyArray, NSArray.EmptyArray, NSArray.EmptyArray);
}
public DirectAction(WORequest aRequest) {
super(aRequest);
}
public WOActionResults notCachedAction() {
return pageWithName("NotCached");
}
public WOActionResults cachedAction() {
return pageWithName("Cached");
}
public WOActionResults defaultAction() {
return pageWithName("Main");
}
}
You must also set the default er.extensions.ERXWOResponseCache.Enabled=true for the cache to get used.
| boolean actionNameIsCachableForClass | ( | Class | actionClass, | |
| String | actionName | |||
| ) |
| WOResponse cachedResponseForRequest | ( | Class | actionClass, | |
| String | actionName, | |||
| WORequest | request | |||
| ) |
| void cacheResponseForRequest | ( | Class | actionClass, | |
| String | actionName, | |||
| WORequest | request, | |||
| WOResponse | response | |||
| ) |
| void flushCache | ( | ) |
| boolean hasPolicy | ( | ) |
| boolean isEnabled | ( | ) |
| void setIsEnabled | ( | boolean | enabled | ) |
| void setPolicy | ( | Policy | policy | ) |
| static ERXWOResponseCache sharedInstance | ( | ) | [static] |
Gets the shared instance
Map cache [protected] |
Boolean isEnabled [protected] |
String NO_CACHE_KEY = "ERXDirectActionRequestHandler.DontCache" [static] |
Header key you can set in the response when creating an error page you don't want to get cached.
ERXWOResponseCache sharedInstance [static, protected] |
Holds a reference to the shared instance
1.5.8