Interface ICache<KEYTYPE,VALUETYPE>

Type Parameters:
KEYTYPE - Cache key type.
VALUETYPE - Cache value type.
All Superinterfaces:
IHasName, IHasSize
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 Details

    • 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 be nullable or not - depends upon the implementation.
      Returns:
      null if no such value is in the cache.