You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Benoit Chesneau <bc...@gmail.com> on 2011/01/28 08:04:20 UTC

Reusing the code: cache facility & generic couchdb_env gen server

Hi all,

Actually we are using cache in two places :

- Auth
- Server

And I see potential need for a place where we need it like rewriting,
maybe others. I wonder if we couldn't reuse the code here rather
adding one cache where we need with all the work it needs.

I see 2 possibilities:

- 1 central cache that handle hooks to refresh content by type of keys
- or maybe better, 1 cache behavior, we could inherit in modules that need it.

That would allow us to reduce the amount of code we have for basically
the same things. In the same spirit we discussed on issue COUCHDB-855
about the possible problems to save some environments variables in
application env. So rather than doing that maybe we could use a
generic genserver wich would allows us to save keys/values related to
the CouchDB environment. Like couch_config but for compiled
environment settings.

Any thoughts ?

- benoƮt