|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value={METHOD,TYPE}) @Inherited @Documented public @interface HttpCache
This annotation can be applied to an event handler method or to an ActionBean
class to
suggest to the HTTP client how it should cache the response. Classes will inherit this annotation
from their superclass. Method-level annotations override class-level annotations. This means, for
example, that applying @HttpCache(allow=false)
to an ActionBean
class turns off
client-side caching for all events except those that are annotated with
@HttpCache(allow=true)
.
Some examples:
@HttpCache
- Same behavior as if the annotation were not present. No headers are
set.@HttpCache(allow=true)
- Same as above.@HttpCache(allow=false)
- Set headers to disable caching and immediately expire the
document.@HttpCache(expires=600)
- Caching is allowed. The document expires in 10 minutes.
Optional Element Summary | |
---|---|
boolean |
allow
Indicates whether the response should be cached by the client. |
int |
expires
The number of seconds into the future that the response should expire. |
public abstract boolean allow
public abstract int expires
allow()
is
false, then this value is ignored and zero is used. If allow()
is true and this
value is less than zero, then no Expires header is sent.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |