Package play.cache

Interface CacheImpl

All Known Implementing Classes:
DummyCacheImpl

@NullMarked @CheckReturnValue public interface CacheImpl
A cache implementation. expiration is specified in seconds.

When implementing this interface make sure to provide a static method with this signature:


 static CacheImpl instance(@NonNull Properties playProperties) throws IOException
 
This method is used by RePlay's Cache class to load the implementation.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    @Nullable Object
    get(String key)
     
    void
    set(String key, @Nullable Object value, int expiration)
     
    void
     
  • Method Details

    • set

      void set(String key, @Nullable Object value, int expiration)
    • get

      @Nullable Object get(String key)
    • clear

      void clear()
    • delete

      void delete(String key)
    • stop

      void stop()