Skip to content

fix: duplicated conditional TTL evaluation - #3267

Open
diydriller wants to merge 1 commit into
spring-projects:mainfrom
diydriller:GH-3266
Open

fix: duplicated conditional TTL evaluation#3267
diydriller wants to merge 1 commit into
spring-projects:mainfrom
diydriller:GH-3266

Conversation

@diydriller

@diydriller diydriller commented Nov 20, 2025

Copy link
Copy Markdown

Summary

This PR refactors duplicated TTL computation logic inside DefaultRedisCacheWriter's get method

following expression was previously evaluated twice

  timeToIdleEnabled && withTtl ? ttl : null

What Changed

A new local variable ttlForGet is introduced to compute the TTL once

Closes: #3266

Signed-off-by: Hyun Jong Park <dhrhd080@naver.com>
@christophstrobl

Copy link
Copy Markdown
Member

LGTM

@christophstrobl christophstrobl removed the status: waiting-for-triage An issue we've not yet triaged label Nov 26, 2025
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 26, 2025
@mp911de
mp911de force-pushed the main branch 2 times, most recently from e0163c7 to 5e76bfb Compare August 5, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor duplicated TTL computation in DefaultRedisCacheWriter's get method

3 participants