net.spy.jwebkit.cache
Interface CacheProvider

All Known Implementing Classes:
MemcachedCacheProvider, SimpleCacheProvider

public interface CacheProvider

A provider for the CacheFilter.


Method Summary
 void destroy()
          Tear down.
 CacheEntry getEntry(java.lang.String key)
          Get the cache entry for the given key.
 void init(javax.servlet.FilterConfig conf)
          Initialize with the given filter config.
 void setEntry(java.lang.String key, CacheEntry ce, long cacheTime)
          Store a cache entry for the given key.
 

Method Detail

init

void init(javax.servlet.FilterConfig conf)
          throws javax.servlet.ServletException
Initialize with the given filter config.

Throws:
javax.servlet.ServletException

destroy

void destroy()
Tear down.


getEntry

CacheEntry getEntry(java.lang.String key)
Get the cache entry for the given key.

Parameters:
key - the cache key
Returns:
the object at that location, or null if there's no object for that key.

setEntry

void setEntry(java.lang.String key,
              CacheEntry ce,
              long cacheTime)
Store a cache entry for the given key.

Parameters:
key - the key under which to store the entry
ce - the entry to store
cacheTime - how long the item should be considered valid


Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.