相关疑难解决方法(0)

如何访问模板缓存? - Django

我在一些模板中缓存html,例如:

{% cache 900 stats %}
    {{ stats }}
{% endcache %}
Run Code Online (Sandbox Code Playgroud)

我可以使用低级库访问缓存吗?例如

html = cache.get('stats')
Run Code Online (Sandbox Code Playgroud)

我真的需要对模板缓存进行一些细粒度的控制:)


有任何想法吗?感谢大家!:d

python django caching django-templates django-cache

8
推荐指数
2
解决办法
1683
查看次数

标签 统计

caching ×1

django ×1

django-cache ×1

django-templates ×1

python ×1