it-tech / cache
Library for working with cache
Installs: 14
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/it-tech/cache
Requires
- php: ^7.1
This package is auto-updated.
Last update: 2025-10-16 02:03:30 UTC
README
Создать объект класса передав в качестве параметра путь до директории кэш
<?php use ITTech\Lib\Cache; $cache = new Cache(__DIR__."/tmp/cache"); /* * Создать кэш * @param $key * @param $data * @param int $time * @return bool */ $cache->set("/controller", "Привет мир!", time() * 24); /* * Выбор их кэша * Возвращает строку или bool в случае просрочки или ошибки */ $cache->get("/controller"); /* * Удалить кэш */ $cache->drop("/controller");