我有不带参数的方法,我想缓存返回值。作为缓存密钥,我想使用安全上下文中当前经过身份验证的用户
@Cacheable(value = "resultCache", key="#userPrincipal.id") public result getResult() {}
有可能吗,还是我的想法错了。
java caching ehcache spring-security spring-boot
caching ×1
ehcache ×1
java ×1
spring-boot ×1
spring-security ×1