Skip to content

Within Cache abstraction, log when a value was found for a key, and when not. [SPR-11654] #16277

@spring-projects-issues

Description

@spring-projects-issues

Brandon Zeeb opened SPR-11654 and commented

We rely heavily on the Spring Cache et al family of abstractions. While the JMX statistics available for some caches are useful, in day to day development and production debugging it's often been essential to know of a particular object was provided by an implementation of Cache or if a backing store (ie: the @Cacheable annotation) was consulted instead.

In short, can we please have some cursory logging at debug level when a value is fetched from a Cache (as in, the key produced a value) and when no value was available? Ideally, the key would be logged in both cases. Optionally, a 3rd log message can be given for the value (with key) at trace level.

I leave it to you to decide where this will go, so long as this is the default behavior.


1 votes, 2 watchers

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions