Django Book 翻译
菜单>:
TOC
返回
原文:
To retrieve multiple cache values in a single shot, use ``cache.get_many()`` . If possible for the given cache back-end, ``get_many()`` will hit the cache only once, as opposed to hitting it once per cache key. ``get_many()`` returns a dictionary with all of the keys you asked for that exist in the cache and havent expired:
翻译:
要想一次获取多个缓存值,可以使用 ``cache.get_many()`` 。如果可能的话,对于给定的缓存后端, ``get_many()`` 将只访问缓存一次,而不是对每个缓存键值都进行一次访问。 ``get_many()`` 所返回的字典包括了你所请求的存在于缓存中且未超时的所有键值。
备注:
译者: