Package com.helger.commons.cache
Interface ICache<KEYTYPE,VALUETYPE>
-
- Type Parameters:
KEYTYPE- Cache key type.VALUETYPE- Cache value type.
- All Known Subinterfaces:
IMutableCache<KEYTYPE,VALUETYPE>
- All Known Implementing Classes:
Cache,DateTimeFormatterCache,MappedCache,PDTFormatter.LocalizedDateFormatCache,RegExCache
public interface ICache<KEYTYPE,VALUETYPE> extends IHasName, IHasSize
Read-only interface for a very simple Map-like cache.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VALUETYPEgetFromCache(KEYTYPE aKey)Get the cached value associated with the passed key.-
Methods inherited from interface com.helger.commons.lang.IHasSize
isEmpty, isNotEmpty, size
-
-
-
-
Method Detail
-
getFromCache
VALUETYPE getFromCache(KEYTYPE aKey)
Get the cached value associated with the passed key. If the value is not in the cache, it might be automatically retrieved from a respective provider.- Parameters:
aKey- The key to be looked up. May benullable or not - depends upon the implementation.- Returns:
nullif no such value is in the cache.
-
-