Interface IApiCache

    • Method Detail

      • get

        Object get​(String key)
        Retrieve an object from the cache
        Parameters:
        key - name of the object to fetch
        Returns:
        null or value of the stored object
      • put

        void put​(String key,
                 Object value)
        Place an object in the cache
        Parameters:
        key - name of the object to store
        value - value of the object
      • put

        void put​(String key,
                 Object value,
                 int ttl)
        Place an object in the cache
        Parameters:
        key - name of the object to store
        value - value of the object
        ttl - time to live, when the object expires
      • remove

        boolean remove​(String key)
        Remove an object from the cache
        Parameters:
        key - name of the object to remove
        Returns:
        returns true when successfully removed the object
      • containsKey

        boolean containsKey​(String key)
        Checks whether or not an object has previously been stored in the cache
        Parameters:
        key - name of the object to find
        Returns:
        true when found
      • clear

        void clear()
        Removes all items in the cache.
      • destroy

        void destroy()
        Closes the cache.