腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
@
Cacheable
with null
key
、
、
、
、
我有一个使用@
Cacheable
缓存方法结果的服务@
Cacheable
(value = "defaultCache",
key
= "#root.methodName.concat('-').concat(#closed") public List<Restaurant> getRestaurants(Boolean
浏览 14
提问于2015-08-21
得票数 0
2
回答
我们可以在spring boot中同时使用多种类型的缓存(redis和guava)吗?
、
、
、
我正在尝试在我的spring boot应用程序中为不同类型的对象提供两个Cache实现。我希望将某些对象存储在redis缓存中,而将其他对象存储在基于该方法的芭乐缓存中。每当我实现两个扩展CachingConfigurerSupport的调用时,我都会得到一个错误,这个类只允许一个实例。有没有人能建议我怎么做?
浏览 3
提问于2016-01-06
得票数 1
1
回答
Spring Ehcache最佳实践
、
、
例如,如果有两个使用相同参数值的@
Cacheable
注释的方法,ehcache将返回最新的缓存值。@
Cacheable
(value="imagesCache",
key
="#id_image") //and@
Cacheable
(value="imagesCache",
key
="#id_image"
浏览 5
提问于2015-02-18
得票数 0
回答已采纳
1
回答
使用Spring缓存缓存嵌套对象?
、
、
、
、
Long id; private Price price;@
Cacheable
(value = "product-cache",
key
= "#id") // some类似于: @GetMapping("{id}&quo
浏览 14
提问于2019-03-18
得票数 3
1
回答
在缓存中更新项目,然后再次调用findAll项目不会更新项目
、
、
、
、
然后我会得到所有的记录: public Page<Item> getItems(Pageable pageRequest){
浏览 1
提问于2017-09-29
得票数 0
2
回答
@Cachable on方法而没有输入参数?
、
、
、
org.springframework.cache.annotation.Cachable注释有一个问题:public ConcurrentMapCache cache() {} public String getApi() {} public String getUrl() {
浏览 2
提问于2018-02-20
得票数 11
回答已采纳
2
回答
如何用NSCache 2.0实现基于时间的NSCache
、
、
extension NSCache { get { } if let value: AnyObject = newValue{ } else { removeObjectForKey(
key
)
浏览 12
提问于2015-11-08
得票数 1
回答已采纳
5
回答
@多键缓存
、
、
、
Object o) { ...} 我想在foo方法上使用@
Cacheable
浏览 0
提问于2012-11-14
得票数 14
回答已采纳
2
回答
如何在Spring boot应用程序中用Java为Redis Cache创建hardCode密钥?
、
、
对于GET服务,没有请求参数可以用来在Redis中存储Webservice的响应,当我尝试用硬编码的
Key
存储它时,它给出了下面的错误。null
key
returned for cache operation (maybe you are using named params on classes without debug info| cacheManager='' | cacheResolver='' | condition='' | unless='' | sync=
浏览 15
提问于2020-04-09
得票数 1
2
回答
在ehcache上@
Cacheable
方法和@
Cacheable
类有什么区别
、
、
、
在使用ehcache时,我注意到@
Cacheable
注解可以用在类解密或方法解密之上,例如;@
Cacheable
Long l;Integer i;
Cacheable
方法: public List<ToBeCached> getCacheableClassList() } 如果@
浏览 3
提问于2014-07-10
得票数 3
2
回答
如何在spring可缓存密钥的方法中指定多个param
、
、
上面的链接显示了当一个方法的所有参数对于默认的缓存键不需要时,如何指定一个键。但是,如何指定多个param (但不是方法arg列表中的所有)作为缓存在缓存注释中的键?
浏览 9
提问于2016-03-02
得票数 0
回答已采纳
1
回答
是否可以定义泛型接口并使用Spring @CacheConfig?
、
、
、
、
JpaRepository<T, ID>, JpaSpecificationExecutor<T>, PagingAndSortingRepository<T, ID> { T findOne(ID id); List<T> findAll(); Page<T> findAll(
key
= "someobject+#
浏览 2
提问于2015-10-07
得票数 4
4
回答
spring缓存-为缓存操作返回的空键
、
、
我在目标方法上使用@
Cacheable
注释,如下所示:public class DataService { public String findByDirector(String name) { }这是我的jUnit它按如下方式抛出一个IllegalArgumentException:
浏览 9
提问于2015-04-25
得票数 12
回答已采纳
1
回答
如何使用spring缓存基于主键缓存系统列表
、
、
、
、
我想缓存存储库类的响应,它有以下方法:Book findById(Long Id); void deleteById(Long id); @
Cacheable
(cacheNames = "books",
key
="
浏览 12
提问于2017-09-20
得票数 2
回答已采纳
1
回答
spring引导应用程序上的多个条件缓存
、
我举下面的例子
cacheable
= { @
Cacheable
(cacheNames ="student_name_",
key
= "#id",@
浏览 2
提问于2022-09-09
得票数 0
1
回答
如何使用CachePut更新缓存?
、
、
我的@
Cacheable
方法有下一个签名:public class UpcomingFilter implements Filter<Entity> { @
Cacheable
(
key
="#entity.id") 过滤器签名吗?= "#root.target.FILTER_
KEY
浏览 1
提问于2018-09-21
得票数 2
2
回答
在多个键中的一个上退出缓存
、
、
、
、
在我的应用程序中,我有多个具有多个键的可缓存方法:@
Cacheable
(cacheNames = "fieldNames",
key
= "{#field, #value, #projectId}") @
Cacheable
(cacheNames= "qi&quo
浏览 7
提问于2016-12-06
得票数 8
回答已采纳
1
回答
从安全上下文中获取当前通过身份验证的用户作为Spring的密钥
、
、
、
、
@
Cacheable
(value = "resultCache",
key
="#userPrincipal.id")这有可能还是我的想法是错的
浏览 7
提问于2021-05-28
得票数 2
回答已采纳
1
回答
为什么@
Cacheable
在控制器和接口中不起作用
、
、
(cacheNames = "employee",
key
= "#id", condition = "#id>0", unless = "#result == null")@
Cacheable
(cacheNames = "employee",
key
= "
浏览 30
提问于2020-12-22
得票数 0
回答已采纳
3
回答
Spring @
Cacheable
如何配置复杂密钥
、
、
、
我有一个返回列表的方法,我想根据参数缓存它,passed.The的参数是4和整数,我怎么用SpEL来配置呢?我使用的是spring版本4.0.6.RELEASE。
浏览 2
提问于2014-10-01
得票数 3
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
SpringBoot 缓存之 @Cacheable 详细介绍
请详细解释如何使用Aspect和Redis来实现缓存功能
统一缓存帝国 - 实战 Spring Cache
GitLab配置SSH KEY
免费领取随机key
热门
标签
更多标签
云服务器
ICP备案
云直播
对象存储
腾讯会议
活动推荐
运营活动
广告
关闭
领券