Login   Register  
PHP Classes

File: tests/sample.memcached.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Oleg Butuzov  >  Cacheme  >  tests/sample.memcached.php  >  Download  
File: tests/sample.memcached.php
Role: Example script
Content type: text/plain
Description: one more sample
Class: Cacheme
Cache data in different types of container
Author: By
Last change:
Date: 6 years ago
Size: 680 bytes


Class file image Download
include dirname(dirname(__FILE__)).'/Cacheme/Cacheme.php';
$cache CacheMeLoader::Factory('memcache://');
$cache->lifetime 10;

$cache->lifetime 24*60*60;
$mycoolvariable "mycoolvariable";

/* setting variable */

/* getting variable */
var_dump('1 - '.$cache->get($mycoolvariable));

/* flush */
var_dump('2 not exists'.$cache->get($mycoolvariable));

/* delete variable */
var_dump('3 not exists'.$cache->get($mycoolvariable));