首页 > 解决方案 > Spring Boot 缓存请求延迟测量

问题描述

我正在使用带有 Redis 缓存的 Spring Boot 2:

implementation 'org.springframework.boot:spring-boot-starter-data-redis'

值通过@Cacheable("key")注释存储在 Redis 中。我需要在访问 Redis 期间记录请求时间。可能吗?

标签: spring-bootloggingredis

解决方案


作为最终解决方案,我决定使用JProfiler方法执行时间监控:

https://www.ej-technologies.com/resources/jprofiler/help/doc/main/methodCallRecording.html


推荐阅读