Interface Cache

All Known Implementing Classes:
NoCache, SimpleCache

public interface Cache
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Clears all entries in the cache.
    get(String key)
    Gets an arbitrary object stored in cache.
    boolean
    set(String key, Object val)
    Sets a key/value pair in the cache.
  • Method Details

    • get

      Object get(String key)
      Gets an arbitrary object stored in cache.
      Parameters:
      key - the key that maps to the object.
      Returns:
      the value mapped to from `key`.
    • set

      boolean set(String key, Object val)
      Sets a key/value pair in the cache.
      Parameters:
      key - the key.
      val - the value.
      Returns:
      if caching was successful.
    • clear

      boolean clear()
      Clears all entries in the cache.
      Returns:
      if clear was successful.