Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport: delegate IIIF Manifest cache key version to presenter #4419

Merged
merged 1 commit into from
Jul 10, 2020

Conversation

no-reply
Copy link
Contributor

it turns out etag isn't a very good cache key because the default
SolrDocument doesn't contain this data. using the system/Fedora
#modified_date is equivalent (has the same weaknesses) but is available on
both an actual work instance, and on its index proxy.

since this is changing (and should likely change again!), delegate it to the
presenter so there's a clear source going forward.

backports #4418

@samvera/hyrax-code-reviewers

it turns out `etag` isn't a very good cache key because the default
`SolrDocument` doesn't contain this data. using the system/Fedora
`#modified_date` is equivalent (has the same weaknesses) but is available on
both an actual work instance, and on its index proxy.

since this is changing (and should likely change again!), delegate it to the
presenter so there's a clear source going forward.
@no-reply no-reply changed the title delegate IIIF Manifest cache key version to presenter backport: delegate IIIF Manifest cache key version to presenter Jul 10, 2020
# @return [String]
def version_for(presenter)
presenter.etag
presenter.version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this explicit method name usage; Instead of relying on an implicit understanding of etag (which is reasonable but just a bit less clear).

@jeremyf jeremyf merged commit 38c1185 into 2.x-stable Jul 10, 2020
@jeremyf jeremyf deleted the manifest-cache-key-backport branch July 10, 2020 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants