Title: Gambit Cache Menus
Author: Benjamin Intal
Published: <strong>2014 年 9 月 19 日</strong>
Last modified: 2014 年 9 月 19 日

---

搜索插件

![](https://ps.w.org/gambit-cache-menus/assets/banner-772x250.png?rev=992982)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/gambit-cache-menus_34495e.svg)

# Gambit Cache Menus

 作者：[Benjamin Intal](https://profiles.wordpress.org/bfintal/)

[下载](https://downloads.wordpress.org/plugin/gambit-cache-menus.1.0.zip)

 * [详情](https://cn.wordpress.org/plugins/gambit-cache-menus/#description)
 * [评价](https://cn.wordpress.org/plugins/gambit-cache-menus/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/gambit-cache-menus/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/gambit-cache-menus/#developers)

 [支持](https://wordpress.org/support/plugin/gambit-cache-menus/)

## 描述

Gambit Cache Menus caches the menus that you use in your front end. This may not
be much (an estimate of 18 milliseconds per menu), but if you have large multilevel
menus, and a lot of site visitors, then the speed savings may bring a lot of benefits.

Just install and activate the plugin, there are no settings page.

A menu rendered normally takes around 0.02 seconds; activating this plugin reduces
this step to 0.002 seconds.

#### Features

 * Shaves off 18ms per menu
 * Uses the Transient API
 * Lightweight
 * Cleanly coded plugin

#### How Does it Work

It’s all about the Transient API. When a menu is rendered in the front end, the 
rendered menu is saved as a transient for caching. Future menu renderings use this
cached copy afterwards. When the menu is updated, or when menu locations are changed,
the transient is forcibly expired to make way for the updated menu.

#### This Is Also a Tutorial

Transients are cool. If you’re not familiar with them then we documented the code
well so that you can check it out.

There should be a companion tutorial about Transients soon.

## 安装

 1. Upload `plugin-name.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Visit your site and enjoy the wee bit faster page loading time

## 评价

此插件暂无评价。

## 贡献者及开发者

「Gambit Cache Menus」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Benjamin Intal ](https://profiles.wordpress.org/bfintal/)

[帮助将「Gambit Cache Menus」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/gambit-cache-menus)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/gambit-cache-menus/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/gambit-cache-menus/)，或通过[RSS](https://plugins.trac.wordpress.org/log/gambit-cache-menus/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/gambit-cache-menus/)。

## 更新日志

#### 1.0

First release

## 额外信息

 *  版本 **1.0**
 *  最后更新：**12 年前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 3.8 或更高版本 **
 *  已测试的最高版本为 **4.0.38**
 *  语言
 * [English (US)](https://wordpress.org/plugins/gambit-cache-menus/)
 * 标签
 * [cache](https://cn.wordpress.org/plugins/tags/cache/)[caching](https://cn.wordpress.org/plugins/tags/caching/)
   [loading speed](https://cn.wordpress.org/plugins/tags/loading-speed/)[menu](https://cn.wordpress.org/plugins/tags/menu/)
   [optimization](https://cn.wordpress.org/plugins/tags/optimization/)[transient](https://cn.wordpress.org/plugins/tags/transient/)
   [W3](https://cn.wordpress.org/plugins/tags/w3/)[wp_nav_menu](https://cn.wordpress.org/plugins/tags/wp_nav_menu/)
 *  [高级视图](https://cn.wordpress.org/plugins/gambit-cache-menus/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/gambit-cache-menus/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/gambit-cache-menus/reviews/)

## 贡献者

 *   [ Benjamin Intal ](https://profiles.wordpress.org/bfintal/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/gambit-cache-menus/)