Django Book 翻译
菜单>:
TOC
返回
原文:
``cache_page`` takes a single argument: the cache timeout, in seconds. In the preceding example, the result of the ``my_view()`` view will be cached for 15 minutes. (Note that weve written it as ``60 * 15`` for the purpose of readability. ``60 * 15`` will be evaluated to ``900`` that is, 15 minutes multiplied by 60 seconds per minute.)
翻译:
``cache_page`` 只接受一个参数:以秒计的缓存超时。在前例中, "my_view()" 视图的结果将被缓存 15 分钟。(注意:为了提高可读性,该参数被书写为 ``60 * 15`` 。 ``60 * 15`` 将被计算为 ``900`` ,也就是说15 分钟乘以每分钟 60 秒。)
备注:
译者: