Interface ClientCache<T,​U>

  • Type Parameters:
    T - the key type
    U - the value type

    public interface ClientCache<T,​U>
    A generic caching abstraction for use in the Inrupt Client Libraries.
    • Method Detail

      • get

        U get​(T key)
        Retrieve a cached value.
        Parameters:
        key - the key
        Returns:
        the cached value, may be null if not present
      • put

        void put​(T key,
                 U value)
        Set a cached value.
        Parameters:
        key - the key, not null
        value - the value, not null
      • invalidate

        void invalidate​(T key)
        Invalidate a single cached value.
        Parameters:
        key - the key, not null
      • invalidateAll

        void invalidateAll()
        Invalidate all values in the cache.