Is mongodb application layer caching worth it?

I am using mongodb as a container for a collection of html help documents which are served by a REST server (cherry on top) using pymongo.

Since the database is relatively small (~ 50 documents) and rarely changes (only when someone edits my webserver interface, which runs on the same machine as the REST server), I wonder if I can speed it up with document caching ... Three options:

a) I could either cache locally (in a Python process) and then listen for, say, an invalidation trigger sent by my web server interface (for example, via a UNIX socket or signal or any other means).

b) I could cache via memcached and my webserver interface is invalid by deleting or updating said documents when something changes.

c) I couldn't do anything and relied on caching through the working set being automatically cached in memory by mongodb (is that?).

What do you think is the best strategy for such cases?

+3
python caching mongodb


source to share


No one has answered this question yet

Check out similar questions:

1554
Disable Chrome cache for website development
1398
How do we control web page caching in all browsers?
1299
How can I query MongoDB with "how"?
1001
Is Safari iOS 6 caching $ .ajax results?
951
How do I force the browser to reload the cached CSS / JS files?
825
How to delete MongoDB database from command line?
683
What is "caching" code?
619
MongoDB vs Kassandra
591
What's the difference between Cache-Control: max-age = 0 and no-cache?
3
Distributed cache with duplicate cache items on different hosts



All Articles
Loading...
X
Show
Funny
Dev
Pics