Flovimart suggested this caching strategy. Is it still relevant?

Hi in 2016 Flovimart suggested this for caching unchanging query results server side:

"you could implement it through a reverse proxy or another strategy in the front of your parse-server

For example, you can configure it with nginx, to cache the requests and serve them before you hit your parse-server installation"

Is this still a way to go? or does redis adapter solve this problem?

My confusion is this:

Is redis adapter caching user specific? or instance specific? or global?

If I get a query result, which never changes. And then some else gets the same result from a different instance. Will they get it from redis or the db?

Caching api responses with a reverse proxy ( nginx or solutions like cloudflare) are common architecture to optimize client side response time and also server side CPU load.

Many company use this strategy, but be aware that you need to be really careful about the cache configuration on the reverse proxy since it could lead to a major security breach.

Many company recently ( like Loom) got a security incident, some data from user A were served to a user B due to a misconfigured cache.

Until you are a high scale company with million of requests by day, you should avoid this kind of optimization if you are not sure about how to set up correctly the reverse proxy.

2 Likes