@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.? Copyright 2005-2006, Stripes Development Team.