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 invalidation with custom key generator #20

Merged
merged 1 commit into from
Dec 20, 2018

Conversation

Geekfish
Copy link
Collaborator

When using the key_generator_callable argument, the decorator will use it to create the cache key, but the invalidate() function will always use the default _make_cache_key, basically breaking invalidation in this case as demonstrated with the test.

This PR ensures that it's used consistently in both cases.

@peterbe
Copy link
Owner

peterbe commented Dec 20, 2018

Thanks!!

@peterbe peterbe merged commit 590daee into peterbe:master Dec 20, 2018
peterbe referenced this pull request in mozilla-services/tecken Dec 27, 2018
This PR updates [django-cache-memoize](https://pypi.org/project/django-cache-memoize) from **0.1.5** to **0.1.6**.



<details>
  <summary>Changelog</summary>
  
  
   ### 0.1.6
   ```
   ~~~~~

- Fetch cache backend later to provide thread-safety
  `pull21 &lt;https://github.com/peterbe/django-cache-memoize/pull/21&gt;`_

- Fix cache invalidation with custom key generator
  `pull20 &lt;https://github.com/peterbe/django-cache-memoize/pull/20&gt;`_
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/django-cache-memoize
  - Changelog: https://pyup.io/changelogs/django-cache-memoize/
  - Repo: https://github.com/peterbe/django-cache-memoize
</details>
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.

3 participants