| java.lang.Object org.openlaszlo.cache.Cache org.openlaszlo.cache.RequestCache
All known Subclasses: org.openlaszlo.cache.MediaCache, org.openlaszlo.cache.DataCache, org.openlaszlo.cache.XMLDataCache,
RequestCache | abstract public class RequestCache extends Cache (Code) | | A class for maintaining a disk-backed cache of HTTP requests.
The main entry point is the getAsSWF method.
Given a specific HTTP request and response, the item returns
an InputStream for a possibly-converted SWF that represents
the item requested. This method may return NULL, indicating
that a special HTTP status code has been stuck in the response.
author: Eric Bloch |
Method Summary | |
public void | getAsSWF(String app, HttpServletRequest req, HttpServletResponse res, DataSource dataSource) Using the given datasource from the incoming request,
get the data if it's out of data from the cache, convert it
to SWF, and write it out to the given response. | public Converter | getConverter() | InputStream | getItemStreamAsSWF(Item item, String app, HttpServletRequest req, HttpServletResponse res, DataSource dataSource) Get the item if it's been updated since the given time. | public Serializable | getKey(HttpServletRequest req) | public boolean | isCacheable(HttpServletRequest req) true if the request is cacheable.If response headers are to be sentback, then the request is not cacheable on the server.If req headers are sent, then the request is not cacheableon the server.If the cache parameter is present and set to true, the request is cacheable. |
RequestCache | public RequestCache(String name, File cacheDirectory, Converter converter, Properties props) throws IOException(Code) | | Creates a new RequestCache instance.
Parameters: name - Parameters: cacheDirectory - a File naming a directorywhere cache files should be kept Parameters: converter - Parameters: props - |
getConverter | public Converter getConverter()(Code) | | Return the converter for this cache
|
isCacheable | public boolean isCacheable(HttpServletRequest req)(Code) | | true if the request is cacheable.If response headers are to be sentback, then the request is not cacheable on the server.If req headers are sent, then the request is not cacheableon the server.If the cache parameter is present and set to true, the request is cacheable. Otherwise it's not. |
|
|