juhara / zzzfile
File storage implementation for ZzzCache
v1.0.3
2018-07-10 13:18 UTC
Requires
- php: >=5.4
- juhara/zzzcache: ^1.0
Requires (Dev)
- phpunit/phpunit: ^5.0
This package is not auto-updated.
Last update: 2024-10-26 08:48:55 UTC
README
File-based cache storage implementation for ZzzCache
Requirement
Installation
Run through composer
$ composer require juhara/zzzfile
How to use
<?php
use Juhara\ZzzCache\Cache;
use Juhara\ZzzCache\Storages\File;
use Juhara\ZzzCache\Helpers\ExpiryCalculator;
use Juhara\ZzzCache\Helpers\Md5Hash;
// create a file-based cache where all cache
// files is stored in directory name
// app/storages/cache with
// filename prefixed with string 'cache'
$cache = new Cache(
new File(
new Md5Hash(),
'app/storages/cache/',
'cache'
),
new ExpiryCalculator()
);
Contributing
If you have any improvement or issues please submit PR.
Thank you.