May I ask in Ristretto how can I sync with Database?

Q: Is that possible that I use Ristretto as cache, and Ristretto automatically handle the data to Database? Thanks.

Description:
I am using Golang to write some webapp. Would like to try the cache library to meet performance requirement. Then I see the benchmark of Ristretto. I am very interested in it and would like to try and evaluate it. Considering finally the data will be persisted in postgres in our architecture, I am thinking is it possible for the webapp to access Ristretto, then Ristretto handle Postgresql itself to minimum the development work and get a good performance. Our major scenario would very likely to be 10% write and 90% read.

Ristretto can’t do this. Even if the interfaces to execute some function on Sets and Deletes existed, you’d still need to provide the logic for those functions. Specifically, Ristretto is a key-value cache and Postgres is a SQL database. Ristretto cannot do the translation between these two formats on its own.

I see. Thanks for your feedback.