Package play.cache

Class EhCacheImpl

  • All Implemented Interfaces:
    CacheImpl

    public class EhCacheImpl
    extends java.lang.Object
    implements CacheImpl
    EhCache implementation.

    Ehcache is an open source, standards-based cache used to boost performance, offload the database and simplify scalability. Ehcache is robust, proven and full-featured and this has made it the most widely-used Java-based cache.

    Expiration is specified in seconds
    See Also:
    http://ehcache.org/
    • Method Detail

      • getInstance

        public static EhCacheImpl getInstance()
      • newInstance

        public static EhCacheImpl newInstance()
      • clear

        public void clear()
        Specified by:
        clear in interface CacheImpl
      • delete

        public void delete​(@Nonnull
                           java.lang.String key)
        Specified by:
        delete in interface CacheImpl
      • get

        @Nullable
        public java.lang.Object get​(@Nonnull
                                    java.lang.String key)
        Specified by:
        get in interface CacheImpl
      • set

        public void set​(@Nonnull
                        java.lang.String key,
                        java.lang.Object value,
                        int expiration)
        Specified by:
        set in interface CacheImpl
      • stop

        public void stop()
        Specified by:
        stop in interface CacheImpl