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,406 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  
Name: Juraj Puchký is available for providing paid consulting. Contact Juraj Puchký .
Classes: 17 packages by
Country: Czech Republic Czech Republic
Age: 42
All time rank: 109211 in Czech Republic Czech Republic
Week rank: 214 Up3 in Czech Republic Czech Republic Up
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

  Files folder image Files (13)  /  samples  
File Role Description
  Accessible without login Plain text file disk.php Example Example script
  Accessible without login Plain text file memcached.php Example Example script
  Accessible without login Plain text file redis.php Example Example script

  Files folder image Files (13)  /  src  
File Role Description
Files folder imageDrivers (3 files)
  Plain text file Cache.php Class Class source
  Plain text file CacheDriver.php Class Class source
  Plain text file ICache.php Class Class source
  Plain text file ICacheDriver.php Class Class source

  Files folder image Files (13)  /  src  /  Drivers  
File Role Description
  Plain text file Disk.php Class Class source
  Plain text file Memcached.php Class Class source
  Plain text file Redis.php Class Class source

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,406
This week:206Up