redis - RedisCache.putIfAbsent is not setting the TTL on the element -


i using rediscache.putifabsent operation of spring-data-redis-1.6.2.release.jar set element value atomically along ttl value.

this how generate cache manager instance

public cachemanager dsynccachemanager() {     rediscachemanager rediscachemanager = new rediscachemanager( redistemplate() );     rediscachemanager.setdefaultexpiration(defaultexpiretimeseconds);     return rediscachemanager; } 

this how call method

cache.putifabsent( key, value ); 

however, when go , check ttl of given key in redis, value returned -1 , not expected ttl used.


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -