Skip to content

Conversation

@jprante
Copy link
Contributor

@jprante jprante commented Nov 24, 2012

Hi Elasticsearch team!

I hacked a simple ETag handling. It's not tested, but it should do.

See discussion https://groups.google.com/forum/?fromgroups=#!topic/elasticsearch/aEjjxQzUhdM

Jörg

@synhershko
Copy link
Contributor

This is rather costly. Can there be a softer version, to be used in more idle indexes where no many updates are happening, where the etag value is associated with index updates (vs computed against the actual content)?

@jprante
Copy link
Contributor Author

jprante commented Nov 24, 2012

Yes. I think one possibility is enabling ETags per REST action, I have to add it.

@jprante
Copy link
Contributor Author

jprante commented Nov 25, 2012

Now, ETag caching can be enabled in the config only per REST action class, e.g. http.cache.etag.restsearchaction: true

The header will look like

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 661
ETag: 4173176557

@jprante
Copy link
Contributor Author

jprante commented Nov 25, 2012

Suppressing ETags on a per index or per type basis is another interesting thing, yes. This depends on the REST action. This needs some work in the RestUtils I guess. And I have to find out if ETag cacheable setting via cluster update API works.

@jprante jprante closed this Nov 25, 2012
@jprante
Copy link
Contributor Author

jprante commented Nov 25, 2012

Oops.

@clintongormley
Copy link
Contributor

Closing this issue given that there has been no support for this, and it is easier to implement client side.

@jprante jprante deleted the etag branch July 25, 2014 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants