arc / cache
Ariadne Component Library: Cache Component
Installs: 378
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 3
Open Issues: 1
pkg:composer/arc/cache
Requires
- php: >=7.1
- arc/base: ~3.0
Requires (Dev)
- phpunit/phpunit: 9.*
README
A flexible component library for PHP
The Ariadne Component Library is a spinoff from the Ariadne Web Application Framework and Content Management System [ http://www.ariadne-cms.org/ ]
arc/cache contains
- cache: a generic cache class and caching proxy object. See docs/cache.md for more information.
Example code:
$cachedObject = \arc\cache::proxy( new heavyClass() ); $result = $cachedObject->aHeavyCall();
Or a caching http client, using arc-web:
$cachedHTTPClient = \arc\cache::proxy( \arc\http::client(), function($params) { return ( \arc\http\headers::parseCacheTime( $params['target']->responseHeaders ) ); });