Interface MiddlewareCache<V>

Type Parameters:
V - the value type
All Known Implementing Classes:
SimpleCache

public interface MiddlewareCache<V>
MiddlewareCache is a simple cache interface for use with caching middleware.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears all values from the cache.
    get(String key)
    Gets a value from the cache.
    void
    put(String key, V value)
    Puts a value in the cache.
    void
    Removes a value from the cache.
  • Method Details

    • get

      V get(String key)
      Gets a value from the cache.
      Parameters:
      key - the cache key
      Returns:
      the cached value, or null if not found
    • put

      void put(String key, V value)
      Puts a value in the cache.
      Parameters:
      key - the cache key
      value - the value to cache
    • remove

      void remove(String key)
      Removes a value from the cache.
      Parameters:
      key - the cache key
    • clear

      void clear()
      Clears all values from the cache.