Package play.cache

Interface CacheImpl

All Known Implementing Classes:
DummyCacheImpl

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 Details

    • set

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

      @Nullable Object get(@Nonnull String key)
    • clear

      void clear()
    • delete

      void delete(@Nonnull String key)
    • stop

      void stop()