Application-level caching worthwhile?

11 views
Skip to first unread message

Dr. Michael Lauer

unread,
May 22, 2015, 6:48:27 PM5/22/15
to mongod...@googlegroups.com
Hi,

I'm using mongodb as container for a set of help html documents
that are being served by a (cherrypy)-based REST server using pymongo.

As the database is relatively small (~50 documents) and changes seldomly
(only when someone edits through my web server frontend, which runs on the
same machine as the REST server), I wonder whether I could speed up
performance by caching the documents. Three options:

a) I could either cache locally (in the Python process) and then listen for, say, an
invalidation trigger being sent by my web server frontend (e.g. through a UNIX
socket or a signal or whatever means).

b) I could cache via memcached and have my web server frontend invalidate
by removing or updating said documents when something changes.

c) I could not do anything and rely on caching through a working set being
automatically cached in memory by mongodb (is it?).

What would you think is a good strategy?

Thanks,

Mickey.

Reply all
Reply to author
Forward
0 new messages