Linux 软件免费装

WP Fragment Cache

开发者 mariuspass
更新时间 2014年6月19日 04:00
PHP版本: 3.7.0 及以上
WordPress版本: 3.9.1
版权: GPLv2 or later
版权网址: 版权信息

标签

caching cache performance output caching cache block fragment cache

下载

详情介绍:

This plugin requires PHP version 5.3.6 or greater and can't be activated without a persistent backend for the WordPress Object Cache. Adds ability to cache particular sections of your site. This plugin is for people who can't use a full page cache or for sites with lots of pages and with frequent changes. It can cache entire loops with the WP_Query(bypassing the database queries) or only the html output of the loop and if the query results has changed(comment added, post was edited, postmeta has changed ...) the cache will be invalidated and regenerated. Example usage: `<?php if ( ! WP_Fragment_Cache::output( $wp_query_or_blockname, $duration ) ): ?> //content to be cached ` Parameters: $wp_query_or_blockname (mixed/string) (optional) a WP_Query(WP_Comment_Query) result or a string. Default: the file and the line where the call was initiated(e.g. widgets/most-commented.php:18). $duration (int/string) (optional) Defines how many seconds to keep the cache for. If you pass 0 the cache will not expire. If you pass the string "only_today" the cache will expire at the end of the current day. You can use WordPress Time Constants. Default: 86400 (one day). Advanced usage: See the wiki pages on GitHub

安装:

  1. You should have a persistent backend for the WordPress Object Cache enabled. This plugin can't be activated without a persistent cache.
  2. Download the plugin and unzip.
  3. Upload them to /wp-content/plugins/ directory on your WordPress installation.
  4. Then activate the WP Fragment Cache plugin from Plugins page.
  5. Edit your template files to include WP Fragment Cache. See the Description tab

常见问题:

I can't activate the plugin.

Please make sure that you have a persistent backend for the WordPress Object Cache enabled.

更新日志:

1.0.4 1.0.3 1.0.2 1.0.1 1.0.0