couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johan Sørensen" <jo...@johansorensen.com>
Subject Re: CouchDB/Memcached
Date Mon, 21 Jul 2008 14:11:32 GMT
On Mon, Jul 21, 2008 at 3:08 PM, Bradford Winfrey
<bradswinfrey@yahoo.com> wrote:
> Now that it's been mentioned a few times - does anyone have
> any hints/tips for working out memcached with couchdb?  I think a
> gentleman named Troy said that's how he was getting around this problem
> in emails prior to this discussion - maybe we should branch this to a
> new thread?

I'm guessing he's doing it from the application level, eg (in
simplified pseudocode):

if result = get_from_memcache(md5_or_some_identifier_of_query)
  return result
else
  get_from_couchdb_and_cache_in_memcached(query)
end

But another approach is to use HTTP caching proxy, such as Varnish
(http://varnish.projects.linpro.no/), which you'd put between your app
and couchdb. You could then, from your app, tell Varnish to purge its
cached item(s) whenever the occasion arises, or let varnish deal with
it through a VCL configuration.

Since I haven't had time to experiment with Varnish+CouchDB yet, it
would be very nice to hear from anyone who has?

Cheers,
JS

Mime
View raw message