org.brutusin.demo.http.ExpiringCachedAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rpc-demo Show documentation
Show all versions of rpc-demo Show documentation
Demo app for brutusin:rcp
The newest version!
package org.brutusin.demo.http;
import org.brutusin.rpc.http.Cacheable;
import org.brutusin.rpc.http.CachingInfo;
import org.brutusin.rpc.http.SafeAction;
public class ExpiringCachedAction extends SafeAction {
private static final String MESSAGE = "This response is cacheable (shared caches) for one day, and can be stored in persistent memory";
@Override
public Cacheable execute(Void input) throws Exception {
return new Cacheable(MESSAGE, new CachingInfo(CachingInfo.DAY, true, true));
}
}