Interface Cache

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void destroy()
      Destroy cache.
      java.lang.Object get​(java.lang.String id)
      Get a resource by id.
      void put​(java.lang.String id, java.lang.Object resource)
      Put a resource into the cache.
    • Method Detail

      • put

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

        java.lang.Object get​(java.lang.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.