sanzodown / simple-php-cache
A simple cache library in php.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/sanzodown/simple-php-cache
Requires (Dev)
- phpunit/phpunit: ^8.1
- symfony/var-dumper: ^4.2
This package is not auto-updated.
Last update: 2025-10-20 13:18:11 UTC
README
A simple cache library for php. It implement both a file and a memory (APCu) cache back-ends.
Installation
As simple as :
composer require sanzodown/simple-php-cache
Usage
Both come with default configuration so if you don't bother, use it.
File cache:
$cache = new FileCache(
    'your/cache/path',
    'youNameFile'
);
Memory cache:
Note that you must have the extension APCu enabled.
$cache = new ApcCache(
    3600, // Time to live
);
Methods:
$cache->set('key', 'Your datas');
$cache->get('test'); // Your datas