RuKoder.ru RUKODER.ru
13 МАЙ 2016
0

cachearium - продвинутая система кэширования на PHP

PHP
Пример
$data = 'xxxx';

// store
$cache = CacheAbstract::factory('your backend');
$cache->store($data, new CacheKey('Namespace', 'Subname'));

// get it later
try { 
    $data2 = $cache->get(new CacheKey('Namespace', 'Subname'));
    // $data2 == 'xxxx';
}
catch (NotCachedException($e)) {
    // handle not cached
}

// store new value with automatic invalidation
$data = 'yyy';
$cache->store($data, new CacheKey('Namespace', 'Subname'));

https://github.com/Corollarium/cachearium

Добавить комментарий

Категории:

  • CSS (121)
  • PHP (301)
  • JavaScript (704)

Оставить на заметку в:

© 2026 RuKoder.ru