electrode
electrode

Reputation: 285

Caffeine cache - put in the cache keys for values unreachable in the database?

my Caffeine cache works perfectly. But, i would like to improve its performances.

In fact, many of keys i want to load from my cache are not in the database. Is there a way that Caffeine put all theses unreachable keys in the map, so that when i request again to the Caffeine cache, caffeine does NOT REQUEST AGAIN to the database ?

exemple :

  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)

is there a way/option to do that ?

Upvotes: 0

Views: 748

Answers (0)

Related Questions