net.sourceforge.stripes.action
Annotation Type HttpCache


@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:

Since:
Stripes 1.5
Author:
Ben Gunter

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.
 

allow

public abstract boolean allow
Indicates whether the response should be cached by the client.

Default:
true

expires

public abstract int expires
The number of seconds into the future that the response should expire. If 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.

Default:
-2147483648


? Copyright 2005-2006, Stripes Development Team.