Login

Tag "invalidation"

Snippet List

Scalable and invalidateble cache_page decorator

This cache_page decorator can be used in replacement to Django's django.views.decorators.cache.cache_page. It resolves two problems: - invalidation (its cache key is not dependent of header nor request, then you can use model signals (or method 'put' in Google App Engine) to invalidate a URL or a list of them) - easier to scale (can be used at once memcached server by many differente servers) Feel free to show me where it can have problems or limitations. **Updated and improved a lot**

  • cache
  • decorator
  • invalidation
Read More

Caching tag with singnal-based invalidation

Example usage: @cached('/data/something_hard') def get_something_complex(): .... return result dispatcher.connect(get_something_complex.invalidate, django.db.models.signals.post_save, Model)

  • cache
  • decorator
  • invalidation
Read More

2 snippets posted so far.