Skip to content

Instantly share code, notes, and snippets.

@spencermorin
Created March 14, 2013 15:12
Show Gist options
  • Save spencermorin/5162137 to your computer and use it in GitHub Desktop.
Save spencermorin/5162137 to your computer and use it in GitHub Desktop.
<?php
$cs_remote_cache = new CS_Remote_Cache();
$key = 'whatever-key-you-want'; // needs to be unique
$data = ''; // the data you want to cache
$expire = 30; // expiration in seconds
$secret = get_option( 'cs_cache_secret_option_key' );
$host_name = site_url();
$cs_remote_cache->cs_cache_set( $key, $data, $expire, $secret, $host_name ); // set the cache
$cached_content = $cs_remote_cache->cs_cache_get( $key, $secret ); // get the cached content
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment