PHP Classes

PHP Cache Object: Save and load variable values in cache containers

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 yet rated by the usersTotal: 64 All time: 10,420 This week: 206Up
Version License PHP version Categories
object-cache 1.0.7GNU General Publi...5PHP 5, Files and Folders, Cache
Description 

Author

This package can save and load variable values in cache containers.

It provides several classes to save values of variables in different types of storage containers implemented by separate classes.

Currently, it supports containers like files, Redis, or Memcached servers.

The cached data is associated with a given key string.

The cached data may remain valid for a given period of time.

If the cached data is still valid, the storage container classes may retrieve the cached value associated with the given cache key.

Picture of Juraj Puchký
  Performance   Level  
Innovation award
Innovation award
Nominee: 6x

 

Example

<?php
require_once __DIR__.'/../vendor/autoload.php';

$object = [1,2,3,4];

$cache = new \BABA\Cache\Cache(new \BABA\Cache\Drivers\Disk(), 3600 * 24);

$cache->store('test', $object);
var_dump($cache->load('test'));


Details

object-cache

Simple framework for store php json serialized objects in cache. Supports Redis, Memcached, Disk.

Samples are provided in folder samples.

For unix socket in Memcached and Redis driver use [ 'sock' = file ] as $params in driver constructor.


  Files folder image Files (13)  
File Role Description
Files folder imagesamples (3 files)
Files folder imagesrc (4 files, 1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file readme.md Doc. Documentation

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  
 100%
Total:64
This week:0
All time:10,420
This week:206Up