We now support time-to-idle (TTI) expiration policies for cache reads.
The TTI implementation is achieved with the use of the Redis GETEX command on Cache.get(key) operations as well as consistently using the same TTL configuration for all cache operations when TTI is enabled and TTL expiration has been configured,
with the use of a TtlFunction or fixed Duration.
Closes#2351
Original pull request: #2643
Make fields final where possible. Reintroduce end of line comment markers to avoid reformatting into unreadable format. Replace HashSet per command instance with String to reduce memory footprint.
Tweak Javadoc wording to represent what we actually expect. Reorder methods.
See #2640
Original pull request: #2644
Add tests that assert initialization constraints, use early return to default value in case of null and align code format.
Original Pull Request: #2637
We now cross-check the existing key type against the specified CollectionType to avoid collection creation that doesn't match the configured CollectionType. If the existing key type doesn't match the configured CollectionType, collection creation fails with a validation error.
Closes#2633
Original Pull Request: #2637
This commit restores the behaviour of RedisConnectionFactories eager initialization via afterPropertiesSet.
Additionally it is now possible to modify the lifecycle phase.
Closes#2635
Original pull request: #2636
Reorder factory fields according to immutable configuration, mutable configuration and connection factory state. Reorder methods and switch Jedis references to its current GitHub repository.
Refine assertions. Update documentation.
See: #2503
Original pull request: #2627
We now allow the internally created Jackson ObjectMapper to be customized and further configured after construction of the GenericJackson2JsonRedisSerializer when a user does not explicitly provide a custom ObjectMapper during construction. Even when providing a custom ObjectMapper, not all configuration applied by the GenericJackson2JsonRedisSerialzier (such as (standard) type resolution) to the internal ObjectMapper would get applied to the user-provided ObjectMapper as well.
Closes#2601
* Cleanup source code in Jackson2HashMapper; Edit Javadoc.
* Add test cases for the un/flattened mapping of an Object with a timestamp (LocalDateTime) as provided by the user in Issue #2593.
Closes#2593
Once again, the SD Redis Jackson2HashMapper can now de/serialize Objects with BigDecimal/BigInteger values along with java.time types, such as java.time.LocalDateTime.
Additionally, splits the unit tests for flattening and unflattening of the hash mapping into 2 separate test classes to be picked up in the SD Redis test suite.
Resolves#2593
After this commit, LettuceObservationContext.setParentObservation() is called right after Context rather than Observation created, then Context.getParentObservation() could be used in ObservationPredicate to determine whether Observation should be created.
Fixes#2591
Original pull request: #2592
We now use directly JedisCluster methods instead of using our command executor routing as JedisCluster exposes the methods and we no longer require our own command routing.
Closes#2589
Now it is possible to construct a new, custom default RedisCacheConfiguration from an existing, default RedisCacheConfiguration.
This is useful in a Spring Boot context using the RedisCacheManagerBuilderCustomizer and acquiring access to the default RedisCacheConfiguration, which likely originated from Spring Boot Redis CacheProperties.
Resolves#2583