/shrimptest-cache-plugin.php

Description

ShrimpTest plugin for WP Super Cache / W3 Total Cache

To enable ShrimpTest support for WP Super Cache, place this plugin file in

  1. wp-content/plugins/wp-super-cache/plugins
Once installed, you must switch your WP Super Cache settings to "half on" mode. Then make sure that it says "ShrimpTest support is enabled" at the bottom of the WP Super Cache Manager page.

To enable ShrimpTest support for W3 Total Cache, place this plugin file in

  1. wp-content/plugins/w3-total-cache/plugins
Once installed, you must switch your W3 Total Cache Page Cache setting to use the "Disk (basic)" method. "Disk (enhanced)" is not supported at this time.

Functions
shrimptest_cache_key_filter (line 33)

ShrimpTest cache key filter

Update the cache key passed in by the caching plugin with extra information on the visitor's experiment participation status. The added information is suffixed on, with the __ delimiter. If experiment status needs to be computed (and thus we should not cache this page) an md5 hash is tacked on instead.

  • return: updated cache key
  • global: object $shrimp:
string shrimptest_cache_key_filter (string $key)
  • string $key: cache key
wp_supercache_shrimptest_admin (line 95)

WP Super Cache admin UI

If we're using WP Super Cache, add some text to the WP Super Cache settings page. This function is registered against the cache_admin_page action.

  • global: object $shrimp:
  • global: string $wp_cache_config_file:
  • global: boolean $wp_super_cache_late_init:
void wp_supercache_shrimptest_admin ()

Documentation generated on Sat, 04 Sep 2010 23:40:58 -0400 by phpDocumentor 1.4.3