Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

Make use of HTTP validation header #9

@e42sh

Description

@e42sh

Currently each requests send to couchdb lacks of a etag validation header. This forces couchdb to regenerate a new response instead of sending only a header back. If we have the possibility to of sending such Requests, we could gain performance and throughput on the php application, couchdb and network usage).

If we could send validation header in the HTTP request, couchdb would send a HTTP 304 Not Modified response back. Such responses would also be very helpful when using a gateway cache (e.g. varnish) infront of couchdb.

Something we would need here, is the possibility to

  • send an If-None-Match header in our request. Maybe as an optional parameter.
  • retrieve the etag of the response and make it accessible when using the Query API. Currently that header is only accessible when using the HTTP client directly (like the StreamClient or SocketClient),

Then a wrapper, like the LoggingClient, could be used to either put it into a local cache like APC or Memcached or just proxy the header to the client.

What do you think @beberlei?

Regards,
Martin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions