library cache
PSR-6 and PSR-16 implementation using the doctrine cache system
psx/cache
PSR-6 and PSR-16 implementation using the doctrine cache system
- Thursday, June 1, 2017
- by k42b3
- Repository
- 1 Watchers
- 2 Stars
- 30,435 Installations
- PHP
- 6 Dependents
- 0 Suggesters
- 1 Forks
- 1 Open issues
- 4 Versions
- 16 % Grown
PSX Cache
About
PSR-6 and PSR-16
implementation using the doctrine cache system., (*1)
Usage
PSR-6
<?php
$pool = new PSX\Cache\Pool(new Doctrine\Common\Cache\FilesystemCache());
$item = $pool->getItem('foo');
if (!$item->isHit()) {
$value = doComplexTask();
$item->set($value);
$item->expiresAfter(3600);
$pool->save($item);
} else {
$value = $item->get();
}
PSR-16
<?php
$cache = new PSX\Cache\SimpleCache(new Doctrine\Common\Cache\FilesystemCache());
$value = $cache->get('foo');
if ($value === null) {
$value = doComplexTask();
$cache->set('foo', $value, 3600);
}
dev-master
9999999-dev
http://phpsx.org
PSR-6 and PSR-16 implementation using the doctrine cache system
Sources
Download
Apache-2.0
The Requires
The Development Requires
cache
doctrine
psr-6
psr-16
v1.0.1
1.0.1.0
http://phpsx.org
PSR-6 and PSR-16 implementation using the doctrine cache system
Sources
Download
Apache-2.0
The Requires
The Development Requires
cache
doctrine
psr-6
psr-16
v0.1.0
0.1.0.0
http://phpsx.org
PSR-6 implementation using the doctrine cache system
Sources
Download
Apache-2.0
The Requires
The Development Requires
cache
doctrine
psr-6
v1.0.0
1.0.0.0
http://phpsx.org
PSR-6 implementation using the doctrine cache system
Sources
Download
Apache-2.0
The Requires
The Development Requires
cache
doctrine
psr-6