PHP Classes

ITE PSR-6 Cache: Cache data in several storage compliant with PSR-6

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
StarStarStarStar 78%Total: 159 All time: 8,989 This week: 43Up
Version License PHP version Categories
ite-cache 1.3Custom (specified...5.6PHP 5, Tools, Cache, PSR
Description 

Author

This package can cache data in several storage containers compliant with PSR-6.

It provides several container classes compliant with PSR-6 specification that can store and retrieve data to be cached.

Currently it provides container classes for storing data in files, session variables, and memcached.

The file cache saves values into files and loads from them if requested and the cache is not expired.

The session cache saves values into user session values. It will be cleared after the user session expires.

The memcached adapter wraps the native memcached extension.

Innovation Award
PHP Programming Innovation award nominee
October 2016
Number 11


Prize: SourceGuarding PHP encoder tool
PSR-6 is a PHP Standards Recommendation from the FIG (Framework Interoperability Group) that defines a common interfaces for packages that want to implement data caching functionality.

This package provides an implementation of the PSR-6 interfaces to store and retrieved cache data in several types of containers like files, session variables and memcached.

This way all applications that need a caching package can use interchangeably these or other compatible packages that implement the PSR-6 interfaces.

Manuel Lemos
Picture of Kiril Savchev
  Performance   Level  
Innovation award
Innovation award
Nominee: 5x

 

Example

<?php

use Ite\Cache\CacheStrategyFactory;

chdir(realpath(__DIR__.'/..'));

require_once
'./vendor/autoload.php';

$factory = new CacheStrategyFactory();
$cache = $factory->create('file', [CacheStrategyFactory::EXPIRE_KEY => 5]);
//$cache = $factory->create('session', ['session_key' => 'session_factory' ,CacheStrategyFactory::EXPIRE_KEY => 5]);

var_dump($cache);


  Files folder image Files (102)  
File Role Description
Files folder imagecache (1 file)
Files folder imagedocs (2 files, 9 directories)
Files folder imageexamples (4 files)
Files folder imagesrc (8 files, 1 directory)
Files folder imagetests (4 files)
Plain text file composer.json Data Auxiliary data
Plain text file composer.lock Data Auxiliary data
Plain text file LICENSE Lic. License text
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:159
This week:0
All time:8,989
This week:43Up
 User Ratings  
 
 All time
Utility:100%StarStarStarStarStarStar
Consistency:100%StarStarStarStarStarStar
Documentation:87%StarStarStarStarStar
Examples:93%StarStarStarStarStar
Tests:-
Videos:-
Overall:78%StarStarStarStar
Rank:44