Skip to content
File-based storage implementation for ZzzCache
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/Storages
tests
.gitignore
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

zzzfile

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.

You can’t perform that action at this time.