| [ Web Proxy ] |
| Viewing: https://docs.sonsofphp.com/components/cache/adapters | [Back] [Original] |
<?php
use SonsOfPHP\Componenet\Cache\Adapter\ApcuAdapter;
use SonsOfPHP\Componenet\Cache\Adapter\ArrayAdapter;
use SonsOfPHP\Componenet\Cache\Adapter\ChainAdapter;
$cache = new ChainAdapter([
new ArrayAdapter(),
new ApcuAdapter(),
]);<?php
use SonsOfPHP\Componenet\Cache\Adapter\FilesystemAdapter;
$cache = new FilesystemAdapter();
// You can configure the directory, default permissions, default ttl, and
// marshaller
$cache = new FilesystemAdapter('/path/to/cache', 0777, 60, new CustomMarshaller());<?php
use SonsOfPHP\Componenet\Cache\Adapter\NullAdapter;
$cache = new NullAdapter();| Web Proxy Viewer | New URL | Original Page |