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

Fix cache key not depending on chosen_algorithm #54

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

xmcp
Copy link
Contributor

@xmcp xmcp commented Oct 5, 2024

This PR fixes #53

@alexprengere alexprengere merged commit edbe5fb into colour-science:master Oct 6, 2024
10 checks passed
alexprengere added a commit that referenced this pull request Oct 11, 2024
alexprengere added a commit that referenced this pull request Oct 11, 2024
@kurtmckee
Copy link
Contributor

It looks like the README needs to be updated as well -- it appears to be documenting broken caching behavior, but please double-check me on that.

@alexprengere
Copy link
Collaborator

The current README documents this:

def get_cache_key(request):
    return request.url

Do you mean that this is broken as request.url is not enough to build a key?
I agree if that is what you mean, but building such a key for general purpose is not trivial, and really depends on the use case.

@kurtmckee
Copy link
Contributor

I just looked at the updated code; looks like whatever is returned by the get_cache_key() call is then augmented internally by adding the compression algorithm.

If my understanding is correct, then there's no need to modify the README. 👍

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.

cache_key should be dependent on chosen_algorithm
3 participants