Login

Snippets by guicifuentes

Snippet List

Decorator cache handler per view

The @cache_holding decorator works in a per-function base, you can specify a list of models or just a model and the second argument is the time in seconds to be cached. You can modify the proxy class by a keyword argument so you can do cache to all kind of things, also if you want to use a prefix as key + the hash value you can specify the prefix keyword argument.

  • cache
  • view
  • decorator
Read More

guicifuentes has posted 1 snippet.