mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-19 19:29:03 +00:00
Prior to this commit a @CachePut operation would fail if the key expression is invalid, but guarded with an unless condition as the former was evaluated too early. This commit makes sure that key for a put is only evaluated if the put operation is active. Note that this does not apply for @Cacheable as the key needs to be computed early to determine if a matching entry exists in the cache. See gh-22769