PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Yerfry Ramirez   Variables Caching   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Variables Caching
Cache variable values generating classes
Author: By
Last change: Example Page
Date: 8 years ago
Size: 480 bytes
 

Contents

Class file image Download
<?php
require 'varCache.class.php';

$cache = new varCache('cache/');

$cache->assign('test', 'result 1'); // can even cache arrays which will be stored in cache/ as previously defined in varCache();
$cache->tempAssign('test', 'result 2'); // remporarily reasings the variable "test"'s value
#echo $cache->delete('test'); // removes both the temporary assigned var and the cached one.
echo $cache->getAssigned('test'); // you can even write in an integer as a key
is_integer()
?>