Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Boot 3.2.2 Upgrade Redis - Null key returned for cache operation #2855

Closed
zoroglu opened this issue Feb 21, 2024 · 3 comments
Closed

Comments

@zoroglu
Copy link

zoroglu commented Feb 21, 2024

After the spring 3.2.2 upgrade Redis Cache gives
Null key returned for cache operation

spring-boot version: 3.2.2

<dependency>
  <groupId>redis.clients</groupId>
  <artifactId>jedis</artifactId>
  <version>5.1.0</version>
</dependency>
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-data-redis</artifactId>
  <exclusions>
    <exclusion>
      <groupId>io.lettuce</groupId>
        <artifactId>lettuce-core</artifactId>
    </exclusion>
  </exclusions>
</dependency>

Cachable Method:

@Cacheable(value = "user", key = "#username", unless = "#result == null")
public String findUsername(String username) {
    ...
}

but if I use key = "#a0" instead of key = "#username", the problem is solved.

@Cacheable(value = "user", key = "#a0", unless = "#result == null")
public String findUsername(String username) {
    ...
}

There was no need to do it this way in the previous version. My previous versions:
spring-boot version: 2.7.4
redis.clients jedis version :3.9.0

What is the reason?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 21, 2024
@mp911de
Copy link
Member

mp911de commented Feb 22, 2024

Referring to #a0 uses an absent key. Happy to provide further guidance if you provide us with a minimal reproducer along some tests that indicate your expectation vs. what actually happens.

@mp911de mp911de added the status: waiting-for-feedback We need additional information before we can continue label Feb 22, 2024
@spring-projects-issues
Copy link

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Feb 29, 2024
@spring-projects-issues
Copy link

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@spring-projects-issues spring-projects-issues closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2024
@spring-projects-issues spring-projects-issues removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants