PHP Classes
elePHPant
Icontem

CacheOne: Store and retrieve data in groups using Redis

Recommend this page to a friend!
  Info   View files Example   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-12-22 (8 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 81 All time: 9,365 This week: 251Up
Version License PHP version Categories
cacheone 1.0.0GNU Lesser Genera...5Networking, PHP 5, Cache
Description Author

This package can store and retrieve data in groups using Redis.

It can connect to a Redis instance and store data associated to given values within a given group specified by name.

The package can also invalidate data stored with given keys or even invalidate all data in a given group of keys.

Innovation Award
PHP Programming Innovation award nominee
December 2018
Number 10
Caching frequently accessed data is an important measure to get more performance from a software system.

Redis is a fast storage system that can be used to cache data.

This package not only can store and retrieve data to cache using Redis, but it can also clean up whole groups of cached data at once thus making it easy to cleanup specific sets of cached data after it is no longer needed.

Manuel Lemos
  Performance   Level  
Name: Jorge Castro <contact>
Classes: 13 packages by
Country: Chile Chile
Age: 43
All time rank: 20757 in Chile Chile
Week rank: 87 Up1 in Chile Chile Up
Innovation award
Innovation award
Nominee: 7x

Winner: 1x

 

Details

CacheOne

CacheOne is a cache class of service for php

First version

Example

Creating a cache (using Redis)

use eftec\CacheOneRedis;
include "../vendor/autoload.php";
$cache=new CacheOneRedis("127.0.0.1","",6379);

Storing a value

$cache->set("group","key1","hello world");
$cache->set("group","key2","hola mundo");

Group is optional and it could be used if we need to invalidate (delete) an entire group.

invalidate a key

$cache->invalidate("key1");

invalidate a group

$cache->invalidateGroup("group");

Version

  • 1.4.1 2018-08-15 Added an internal function that obtains the id.
  • 1.4 2018-09-05 Fixed the groups
  • 1.3.1 2018-06-09 First published version

License

MIT License. Copyright Jorge Castro Castillo

  Files folder image Files  
File Role Description
Files folder imagelib (3 files)
Files folder imagetest (2 files)
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  /  lib  
File Role Description
  Plain text file CacheOneMemcached.php Class Class source
  Plain text file CacheOneRedis.php Class Class source
  Plain text file ICacheOne.php Class Class source

  Files folder image Files  /  test  
File Role Description
  Accessible without login Plain text file test.php Example Example script
  Accessible without login Plain text file testerror.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:81
This week:0
All time:9,365
This week:251Up