couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hendrik Jan van Meerveld <haa...@gmail.com>
Subject Re: How to set cache-control headers for attachments
Date Sat, 14 Apr 2012 12:08:51 GMT
Thank you again Robert.

I added some rules to the Nginx proxy that I was using allready.
This is a good enough solution for my requirements.

I needed a proxy anyway because I wanted to hide some parts of Couchdb from
the outer world.

Kind regards,
Hendrik Jan


On 14 April 2012 13:57, Robert Newson <rnewson@apache.org> wrote:

> You can't currently control response headers for attachments. You can
> add some proxy middleware fairly easily, though I concede it's not
> ideal.
>
> The fundamental problem here is that you want to lose cache coherency
> for performance reasons. That is, you want to allow the possibility
> that a GET will return 304 (Not Modified) even if the item has been
> modified. Out of the box, CouchDB won't allow you to violate that
> expectation.
>
> B.
>
> On 14 April 2012 07:52, Hendrik Jan van Meerveld <haaiee@gmail.com> wrote:
> > Hi Couchdb people,
> >
> > Can I set headers for attachments?
> >
> > I'd like to add headers like
> >  Cache-Control: max-age=3600, must-revalidate
> >  ExpiresDefault "access plus 10 years"
> >  CacheQueries PUBLIC http://www.mysite.com/*
> > to image attachments in my couchapp website.
> > Because the site is mainly for mobiles, it is very important for me to
> > reduce the amount of data and number of HTTP requests.
> >
> >
> > Couchdb user Rober Newson gave me useful information on how to set
> headers
> > for lists and shows
> > https://wiki.apache.org/couchdb/Formatting_with_Show_and_List
> > https://wiki.apache.org/couchdb/ExternalProcesses#JSON_Response
> > but I cannot find any information on attachments (or probably I don't
> > understand the information that I read).
> >
> > Kind regards,
> > Hendrik Jan
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message