Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

172 Commits

Repository files navigation

Pinga Cache

Based on wonderful utopia-cache and scrawler-labs/swoole-cache

Getting Started

Install using composer:

composer require pinga/cache

File System Adapter

<?phprequire_once__DIR__ . '/../../vendor/autoload.php';
usePinga\Cache\Cache;
usePinga\Cache\Adapter\Filesystem;
$cache = newCache(newFilesystem('/cache-dir'));
$key = 'data-from-example.com';
$data = $cache->load($key, 60 * 60 * 24 * 30 * 3/* 3 months */);
if(!$data) {
$data = file_get_contents('https://example.com');
$cache->save($key, $data);
}
echo$data;

Copyright and license

The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php

About

Lite & fast micro PHP cache library

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages