voceconnect/voce-widget-cache

Adds ability to easily cache widget output for better performance.

1.5.2 2015-01-05 19:56 UTC

This package is not auto-updated.

Last update: 2024-03-16 13:10:36 UTC


README

Please note: This plugin is no longer being actively maintained or supported.

Voce Widget Cache

Contributors: johnciacia, markparolisi, voceplatforms
Tags: widget, cache, caching, performance
Requires at least: 3.3
Tested up to: 4.1
Stable tag: 1.5.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Description

Adds ability to easily cache widget output for better performance. This plugin does not cache widgets automatically! You must define which widgets get cached.

Installation

As standard plugin:

See Installing Plugins.

As theme or plugin dependency:

After dropping the plugin into the containing theme or plugin, add the following:

if( ! class_exists( 'Voce_Widget_Cache' ) ) {
	require_once( $path_to_voce_widget_cache . '/voce-widget-cache.php' );
}

Usage

Example

Add a widget to the cache and designate which actions the cache gets flushed on.

$widget_cache = Voce_Widget_Cache::GetInstance();
$widget_cache->cache_widget( 'Archive_Links_Widget', array( 'save_post' ) );
$widget_cache->cache_widget( 'WP_Widget_Recent_Posts' );

#Frequently Asked Questions

  • I installed the plugin but nothing is happening
    • The caching is not automatic. Refer to the documentation to see how to implement caching on widgets.
  • How can I verify my widgets are being cached?
    • You could use a plugin like WPDB Profiling

#Changelog 1.5.1

  • Testing with WordPress 4.1

1.5

  • Removing cache interaction on customizer preview

1.4.1

  • Adding Capistrano deploy files

1.4

  • Adding composer support

1.3

  • Fix PHP Warning is widget array is not set

1.2

  • oks to clear a widget's cache are now optional.

1.1

  • Updated documentation.

1.0

  • Initial version.