Class DataCache<T>
- java.lang.Object
-
- org.owasp.dependencycheck.data.cache.DataCache<T>
-
- Type Parameters:
T
- the object type that will be cached
public class DataCache<T> extends java.lang.Object
A generic wrapper for the Java Caching System (JCS).- Author:
- Jeremy Long
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
get(java.lang.String key)
Gets an object from the cache.void
put(java.lang.String key, T content)
Puts an object into the cache.
-
-
-
Constructor Detail
-
DataCache
public DataCache(org.apache.commons.jcs3.access.CacheAccess<java.lang.String,T> cache)
Creates a new generic JCS wrapper.- Parameters:
cache
- a reference to the underlying cache implementation.
-
-
Method Detail
-
get
public T get(java.lang.String key)
Gets an object from the cache.- Parameters:
key
- the key for the cached object- Returns:
- the cached object
-
put
public void put(java.lang.String key, T content)
Puts an object into the cache.- Parameters:
key
- the key for the cached objectcontent
- the object to put into the cache
-
-