Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

A simple PHP class using the singleton design pattern to handle caching data via APC, eaccelerator, xcache and file-based caching.

Notifications You must be signed in to change notification settings

vasiliishvakin/LocalCache

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning Repository is outdated and abandoned! 🚫 No active development or any support! ☠️

LocalCache

Parts of this code are based on and/or adapted from original work by [Adam King] (https://github.com/agking/php-cache-class)

A simple PHP composer module, using the singleton design pattern to handle caching data.

Currently supports APC, but may be adapt to 'eaccelerator', 'xcache', 'file', etc.

$cache = LocalCache::getInstance();
if (false !== ($data = $cache->get($id))) {
    $data = get_data_from_db($id);
    $cache->set($id, $data);
}
return $data;

The data is automatically serialize/unserialize in LocalCache;

About

A simple PHP class using the singleton design pattern to handle caching data via APC, eaccelerator, xcache and file-based caching.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%