net.loginbuddy.common/src/main/java/net/loginbuddy/common/cache/LoginbuddyCache.java
/**
     * Any added value has a lifetime matching the given value. The max. lifetime is 3600s.
     *
     * @param key
     * @param obj
     * @param lifetimeInSeconds for 'null' the lifetime is set to 120
     * @return
     */
Any added value has a lifetime matching the given value. The max. lifetime is 3600s.
@param key
@param obj
@param lifetimeInSeconds for 'null' the lifetime is set to 120
@return
Any added value has a lifetime matching the given value . The max . lifetime is 3600s . @param key @param obj @param lifetimeInSeconds for ' null ' the lifetime is set to 120 @return
public Object put(String key, Object obj, Long lifetimeInSeconds) {
        if(lifetimeInSeconds == null || lifetimeInSeconds > 3600 || lifetimeInSeconds <=0) {
            lifetimeInSeconds = 120L;
        }
        listOfExpirations.put(new Date().getTime() + lifetimeInSeconds*1000, key);
        return cache.put(key, obj);
    }
public Object put ( String key , Object obj , Long lifetimeInSeconds ) { if ( lifetimeInSeconds == null || lifetimeInSeconds > 3600 || lifetimeInSeconds <= 0 ) { lifetimeInSeconds = 120L ; } listOfExpirations . put ( new Date ( ) . getTime ( ) + lifetimeInSeconds * 1000 , key ) ; return cache . put ( key , obj ) ; }
Any added value has a lifetime matching the given value.
Any added value has a lifetime matching the given value .