myproject/decorators.py代码:
from django.core.cache import cache
def cached(cache_key='', timeout_seconds=1800):
def _cached(func):
def do_cache(*args, **kws):
if isinstance(cache_key, str):
key = cache_key % locals()
elif callable(cache_...... (
查看原文)
2007-11-30 08:00