Cache Component

version
MIT License

Form component allows you to easily create HTML forms.

Installation

composer require flextype-components/cache

Usage

use Flextype\Component\Cache\Cache;

Configure the settings of Cache

Cache::configure('cache_dir', 'path/to/cache/dir');

Get data from cache

$profile = Cache::get('profiles', 'profile');

Create new cache file $key in namescapce $namespace with the given data $data

$profile = ['login' => 'Awilum',
             'url' => 'http://flextype.org'];
Cache::put('profiles', 'profile', $profile);

Deletes a cache in specific namespace

Cache::delete('profiles', 'profile');

Clean specific cache namespace

Cache::clean('profiles');

License

See LICENSE


Download

Download on the Github