Klasa jest opublikowana na licencji GPL.
<?php require_once 'cache.class.php'; require_once 'fileCacheDriver.class.php'; function getPrinters(){ } try { $cache=new Cache(); $cache->addDriver('file', new FileCacheDriver()); $printers=$cache->get('products', 'printers', 500); # zwraca dane z cache z grupy products o id printers if($printers===false) { #nie ma danych w cache $printers=getPrinters(); $cache->set('products', 'printers', $printers); #ustawia dane do cache } } catch (CacheException $e){ } ?>
Cały kod
Pobierz
Strona projektu - zmiany etc.
Prosze o oceny i uwagi