Interface Cache

All Known Implementing Classes:
DefaultHalResourceCache

public interface Cache
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Destroy cache.
    get(String id)
    Get a resource by id.
    void
    put(String id, Object resource)
    Put a resource into the cache.
  • Method Details

    • put

      void put(String id, Object resource)
      Put a resource into the cache.
      Parameters:
      id - the id of the resource
      resource - the resource to cache
    • get

      Object get(String id)
      Get a resource by id.
      Parameters:
      id - the id of the resource
      Returns:
      the resource or null if non is found or the resource time to live expired
    • destroy

      void destroy()
      Destroy cache.