Interface IMutableCache<KEYTYPE,VALUETYPE>

Type Parameters:
KEYTYPE - Cache key type.
VALUETYPE - Cache value type.
All Superinterfaces:
ICache<KEYTYPE,VALUETYPE>, IHasName, IHasSize
All Known Implementing Classes:
Cache, DateTimeFormatterCache, MappedCache, PDTFormatter.LocalizedDateFormatCache, RegExCache

public interface IMutableCache<KEYTYPE,VALUETYPE> extends ICache<KEYTYPE,VALUETYPE>
Interface for a very simple Map-like cache.
Author:
Philip Helger
  • Method Details

    • removeFromCache

      @Nonnull EChange removeFromCache(KEYTYPE aKey)
      Remove the given key from the cache.
      Parameters:
      aKey - The key to be removed. May be nullable or not - depends upon the implementation.
      Returns:
      EChange.CHANGED upon success, EChange.UNCHANGED if the key was not within the cache,
    • clearCache

      @Nonnull EChange clearCache()
      Remove all cached elements.
      Returns:
      EChange.