Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
When you select on PutDistributedMapCache CACHE_UPDATE_STRATEGY = CACHE_UPDATE_REPLACE we execute "cache.put(cacheKey, cacheValue, keySerializer, valueSerializer);" LINK
If you use redis as backend service this jumps to: RedisDistributedMapCacheClientService.java -> redisConnection.set(kv.getKey(), kv.getValue(), Expiration.seconds(ttl), null); LINK
Calling to spring-data/redis/ library, but we have a bug putting null as Option parameter, causing an error "option cannot be null", because according to library: "option - must not be null." Library Link
If we want to update strategy we should use: RedisStringCommands.SetOption.upsert()