/plugins/plugin-cache-support.php

Description

ShrimpTest caching support plugin

This ShrimpTest plugin supports caching of pages with ShrimpTest experiments in a smart way. The shrimptest-cache-plugin.php file must be installed with W3 Total Cache or WP Super Cache in order to get caching to work.

Functions
shrimptest_cache_support_add_sql (line 27)

Add the SQL create table statement so that ShrimpTest::ensure_db() can create a request_touches table which keeps track of which experiments are touched by what requests.

This is registered against the shrimptest_dbdelta_sql filter.

array shrimptest_cache_support_add_sql (array $sql)
  • array $sql
shrimptest_cache_support_get_cache_visitor_variants_string (line 164)

Compute a string which represents a visitor's participation in experiments and the associated variant ids

This string is affixed to caching keys to create a string which is unique to the "experiment environment" of the visitor. That way, if multiple requests are made with the same visitor variant string, it can be cached.

Returns 'no experiments on this page' if, well, that's the case.

Returns 'calculating experiments list' if there's no cached data on what experiments may be touched by this request and this data must be built up.

string shrimptest_cache_support_get_cache_visitor_variants_string ()
shrimptest_cache_support_record_touched (line 53)

Record the "touched" experiments for the current request

void shrimptest_cache_support_record_touched ([bool $force = false])
  • bool $force
shrimptest_cache_support_request_uri (line 137)

Compute a URL for the current request, to be used as the key for recording the "touched" experiments and metrics.

string shrimptest_cache_support_request_uri ()

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