org.springframework.extensions.surf.cache
Interface ContentCache<K>

All Known Implementing Classes:
BasicCache, ModelObjectCache, PersistentCache

public interface ContentCache<K>

Interface that describes basic methods for working with a cache of content objects.

Author:
muzquiano

Method Summary
 Object get(String key)
          Gets content stored in the cache
 void invalidate()
          Invalidates the cache
 void put(String key, K obj)
          Places content into the cache (with default timeout)
 void put(String key, K obj, long timeout)
          Places content into the cache
 void remove(String key)
          Removes a content object from the cache.
 

Method Detail

get

Object get(String key)
Gets content stored in the cache

Parameters:
key - the key
Returns:
the object

put

void put(String key,
         K obj)
Places content into the cache (with default timeout)

Parameters:
key - the key
obj - the obj

put

void put(String key,
         K obj,
         long timeout)
Places content into the cache

Parameters:
key - the key
obj - the obj
timeout - the timeout in milliseconds

remove

void remove(String key)
Removes a content object from the cache.

Parameters:
key - the key

invalidate

void invalidate()
Invalidates the cache



Copyright © 2009 SpringSource, Inc. All Rights Reserved.