0

我的咖啡因缓存完美运行。但是,我想提高它的性能。

事实上,我想从缓存中加载的许多键都不在数据库中。有没有办法让咖啡因将所有这些无法访问的键放在地图中,这样当我再次请求咖啡因缓存时,咖啡因不会再次请求数据库?

例子:

  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)

有没有办法/选项来做到这一点?

4

0 回答 0