sarahman/simple-filesystem-cache
Simple file system cache library for PHP built on top of PSR-16.
Maintainers
Package info
github.com/sarahman/simple-filesystem-cache
pkg:composer/sarahman/simple-filesystem-cache
1.0.2
2020-08-09 05:14 UTC
Requires
- ext-json: *
- psr/simple-cache: *
Requires (Dev)
- phpunit/phpunit: ^4.8
Suggests
None
Provides
Conflicts
None
Replaces
None
MIT adb8f79a3890e51692db02aadeaa42999f7ff5e3
- Syed Abidur Rahman <aabid048.woop@gmail.com>
This package is auto-updated.
Last update: 2026-06-09 17:42:29 UTC
README
PHP Cache library built by PSR-16 simple cache interface
You can find implementations of the specification by looking for packages providing the psr/simple-cache-implementation virtual package.
Installation
- Run this command:
composer require sarahman/simple-filesystem-cache
Usages
- Create a file named
test.phpin your root directory and add these following codes:
<?php require "vendor/autoload.php"; $cache = new Sarahman\SimpleCache\FileSystemCache(); // the custom cache directory can be set through the parameter. // Set Cache key. $data = [ 'sample' => 'data', 'another' => 'data' ]; $cache->set('your_custom_key', $data); // Check cached key exists or not. $cache->has('your_custom_key'); // Get Cached key data. $cache->get('your_custom_key');
- then run
php test.php
