PHP Classes

Variables Caching: Cache variable values generating classes

Recommend this page to a friend!
  Info   View files Example   View files View files (1)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 136 All time: 9,218 This week: 200Up
Version License PHP version Categories
variables-caching 1.0GNU General Publi...5PHP 5, Cache, Code Generation


This class can cache variable values generating classes.

It can set the value of a variable to be cached by generating the code for a class that stores the value of the variable in the class code.

The generated class name is set to the variable name. The class file is stored in a configured class value.

The class can also retrieve the cached variable value by loading the class file if it exists.

It can also delete the cached variable removing the class file.

Innovation Award
PHP Programming Innovation award nominee
October 2015
Number 6
One way to speed up the access to frequently requested information is to create cache files that store that information, thus avoiding the overhead of computing the information again next time it is necessary.

This class implements an unusual approach to store values of variables in cache files.

It generates class files with variables that hold the cached variable values. The generated classes have a name based on the name of the variable to cache.

The class can use auto-loading to load the class of the variable with the cached values.

Manuel Lemos
Picture of Yerfry Ramirez
  Performance   Level  
Name: Yerfry Ramirez is available for providing paid consulting. Contact Yerfry Ramirez .
Classes: 7 packages by
Country: Sweden Sweden
Age: ???
All time rank: 184318 in Sweden Sweden
Week rank: 568 Up2 in Sweden Sweden Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Accessible without login Plain text file index.php Example Example script

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:9,218
This week:200Up