@ Override public void set ( String key , Object value , int expiration ) { Element element = new Element ( key , value ) ; if ( expiration == 0 ) { element . setEternal ( true ) ; } element . setTimeToLive ( expiration ) ; cache . put ( element ) ; }
Adds an entry in the cache .