You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you rely on Content-Type and different serializers of same record to serve different formats under same url, you might have caching issues on most of the browsers. Because invenio sets Last-Modified and Etag based on only record's version.
So it's likely that browser will reply with a different format to requests that has the same url. For example application/json instead of application/x-bibtex, because of same Etag and Last-Modified
Quick workaround would be remove Last-Modified and put Etag that includes both version and Content-Type.
The text was updated successfully, but these errors were encountered:
We cannot use an ETag which uses both the revision id and content-type with the current implementation since ETag are used both as a caching mechanism and for concurrency control. For caching it works:
Create record
GET xml
GET json
will get you the right content and caching works.
However, if you do:
Create record
GET xml
GET json
PUT and update record
This probably will fail (please verify) and we need to find a solution that separates these concerns.
Suggestions on where to go next
Investigate if strong vs. weak ETags could be a solution
Find a way to separate ETag usage for caching and concurrency control
Ensure that check_etag works correctly with weak and strong ETags
Now strong ETags are used by default - investigate if weak should be used by default
When you rely on
Content-Type
and different serializers of same record to serve different formats under same url, you might have caching issues on most of the browsers. Because invenio setsLast-Modified
andEtag
based on only record's version.So it's likely that browser will reply with a different format to requests that has the same url. For example
application/json
instead ofapplication/x-bibtex
, because of sameEtag
andLast-Modified
Quick workaround would be remove
Last-Modified
and putEtag
that includes bothversion
andContent-Type
.The text was updated successfully, but these errors were encountered: