Hi, This is kind of similar to the question "can I cache POSTs"?
My situation is the following: We use ElasticSearch[1] for search indexing and would like to put a varnish in front of it, to cache recurring queries for some time (we do a lot of automated queries). Now, ElasticSearch has a rather 'creative' HTTP Api, mostly due to their complex Query system, wrapped into a JSON format[2]. The ElasticSearch backend expects this JSON as body of either a GET or a POST request. The first is non-compliant, because servers should ignore bodies on GET-requests, the second is non-compliant because POSTs are not intended for reading data *sigh*. Nevertheless, thats what I am stuck with. Now, back to varnish: it seem like varnish always strips the body before emitting a backend request if it is not in pass mode. Is there any way to circumvent this? I already send a special header containing a hash of the body to make it easier for varnish to lookup the object to this request. But without passing on the body, this is futile. Is there a solution using VCL for this or should I look for other solutions? Regards, Florian [1]: <http://elasticsearch.com> [2]: <http://www.elasticsearch.com/docs/elasticsearch/rest_api/search/> -- Florian Gilcher smtp: [email protected] jabber: [email protected] gpg: 533148E2 _______________________________________________ varnish-misc mailing list [email protected] http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
