PHP Classes

MultiCache library: Cache data in files or memcached

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 590 All time: 5,261 This week: 206Up
Version License PHP version Categories
multicache-library 1.01GNU Lesser Genera...5.0PHP 5, Files and Folders, Cache
Description 

Author

This package can be used to cache data in files or memcached server.

It provides a base generic caching class and sub-classes to store cached data in files or in a memcached server.

The class can associate unique cache keys with cached data.

The cached data may expire after an optional expiry time. The class may clean up expired cache entries.

Picture of V
Name: V <contact>
Classes: 3 packages by
Country: The Netherlands The Netherlands
Innovation award
Innovation award
Nominee: 1x

Example

<?php
include '../../MultiCache.class.php';
include
'../../MultiCacheFile.class.php';

$mc = new MultiCacheFile();
$mc->set('test', 'value', 10);

print
$mc->get('test');


Details

README (MultiCache class) ========================================= NAME: MultiCache class VERSION: 1.00 DESCRIPTION: MultiCache class class provides a convenient way to work with caches. It can use local file system, memcache or other external storage. Supported features: - File system cache and memcache. - Cache limit control. Check cache size and number of cached items. - Flexible cache clean logic (garbage collector). SYNOPSIS: <?php include 'MultiCache.class.php'; include 'MultiCacheFile.class.php'; $mc = new MultiCacheFile(); $mc->set('test', 'value', 10); print $mc->get('test'); ?> <?php include 'MultiCache.class.php'; include 'MultiCacheMemcache.class.php'; $mc = new MultiCacheMemcache(); $mc->set('test', 'value', 10); print $mc->get('test'); ?>

  Files folder image Files (7)  
File Role Description
Accessible without login Plain text file MultiCache.class.php Class MultiCache class
Accessible without login Plain text file MultiCacheFile.class.php Class MultiCacheFile class
Accessible without login Plain text file MultiCacheMemcache.class.php Class MultiCacheMemcache class
Accessible without login Plain text file example.php Example Example
Accessible without login Plain text file README Doc. README
Accessible without login Plain text file ChangeLog Data ChangeLog
Accessible without login Plain text file LICENSE Lic. LICENSE

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:590
This week:0
All time:5,261
This week:206Up