java - 咖啡因缓存 - 为数据库中无法访问的值放入缓存键?
问题描述
我的咖啡因缓存完美运行。但是,我想提高它的性能。
事实上,我想从缓存中加载的许多键都不在数据库中。有没有办法让咖啡因将所有这些无法访问的键放在地图中,这样当我再次请求咖啡因缓存时,咖啡因不会再次请求数据库?
例子:
key FR12333 : exist in DB ==> is put in the cache as ("FR12333","something")
key FR76663 : exist in DB ==> is put in the cache as ("FR76663","something")
key FR88888 : DO NOT exist in DB ==> is put in the cache as ("FR88888",null)
有没有办法/选项来做到这一点?
解决方案
推荐阅读
- jquery - Internet Explorer 11 在交互超过 1000 行并使用 jQuery 隐藏每个元素时崩溃
- python - Python将xml文件转换为csv
- ffmpeg - 使用 ffmpeg 发送 udp cbr 内容会导致内存问题
- c# - AspNet Core - 动态剃刀视图无法显示控制器中传递的值
- python - ValueError: x, y, and format string must not be None 是什么意思?
- mysql - MySql如何在一个项目上远程协作
- apache-nifi - 如何配置安全的 Minifi-C++ 实例以从安全的 C2 服务器中提取?
- java - 无法在 Volley 中解析符号 queue.add(stringRequest)
- github - 在已经是团队成员的情况下重命名 Github 帐户名
- excel - powershell中的转义分号