2017 © Pedro Peláez
 

library cache

PHP Cache Library

image

gigabyte/cache

PHP Cache Library

  • Thursday, February 18, 2016
  • by FaizRasool
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Extreme PHP Cache

You can install Extreme PHP Cache either via package download from github or via composer install. I encourage you to do the latter:, (*1)

{ 
  "require": {
    "gigabyte/cache": "dev-master"
  }
} 

This PHP library makes it easy to cache any php object to the cache with the specific parameters. Currently it only support file system cache., (*2)

Basic usage

namespace gigabyte\cache;

$cache_config = new CacheConfig();
$cache_config->setCacheModule('search result')
        ->setIntervalInDay(2)
        ->setCacheFilter(array('serach' => $serach, 'param1' => $value1, 'param2' => $value2));
$cache = CacheFactory::createFileCache($cache_config,"mycache/");
if ($cache->checkCache()) {
    $search_result = $cache->readCache();
} else {
    //calculate $search_result
    $cache->writeCache($search_result);
}

The Versions

18/02 2016

dev-master

9999999-dev

PHP Cache Library

  Sources   Download

GNU

The Requires

  • php >=5.4

 

by Faiz Rasool