Skip to content

fibsifan/spring-cache-error

Repository files navigation

Spring (Boot) Caching Error

This is a small application to demonstrate a caching error in spring.

When using static methods for generating cache keys (as documented in the Spring Reference Manual) the static method for key generation is incorrectly cached.

If static methods of a class hierarchy have the same name, depending on which one will be first used is the one providing the Cache key for all usages of that method.

As a result from that, depending whether you call GET https://localhost:8080/parent or GET https://localhost:8080/child first, you'll always get the same response, althouth different cache key methods are declared.

About

Small demo project to illustrate a spring but in 6.2.11

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages