public class BasicCache<K> extends Object implements ContentCache<K>
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<String,CacheItem<K>> |
cache
Deprecated.
|
protected long |
timeout
Deprecated.
|
| Constructor and Description |
|---|
BasicCache(long timeout)
Deprecated.
Instantiates a new basic cache.
|
BasicCache(long timeout,
int size)
Deprecated.
Instantiates a new basic cache.
|
| Modifier and Type | Method and Description |
|---|---|
K |
get(String key)
Deprecated.
Gets content stored in the cache
|
void |
invalidate()
Deprecated.
Invalidates the cache
|
Set<String> |
keys()
Deprecated.
Returns keys for the items in the cache
|
void |
put(String key,
K obj)
Deprecated.
Places content into the cache (with default timeout)
|
void |
put(String key,
K obj,
long timeout)
Deprecated.
Places content into the cache
|
void |
remove(String key)
Deprecated.
Removes a content object from the cache.
|
Collection<CacheItem<K>> |
values()
Deprecated.
Returns the values for the items in the cache
|
public BasicCache(long timeout)
timeout - the timeoutpublic BasicCache(long timeout,
int size)
timeout - the timeoutsize - Cache sizepublic K get(String key)
ContentCacheget in interface ContentCache<K>key - the keypublic void remove(String key)
ContentCacheremove in interface ContentCache<K>key - the keypublic void put(String key, K obj)
ContentCacheput in interface ContentCache<K>key - the keyobj - the objpublic void put(String key, K obj, long timeout)
ContentCacheput in interface ContentCache<K>key - the keyobj - the objtimeout - the timeout in millisecondspublic void invalidate()
ContentCacheinvalidate in interface ContentCache<K>public Collection<CacheItem<K>> values()
Copyright © 2005–2016 Alfresco Software. All rights reserved.