Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.core.cache import cache
- def returnCache(function):
- def wrap(*args, **kwargs):
- if len(args) == 1:
- return_page = cache.get(function.__name__)
- if return_page:
- return_page
- else:
- return function(*args, **kwargs)
- return wrap
Add Comment
Please, Sign In to add comment