jowy / silex-cache-service-provider
使用 doctrine cache 的 Silex 缓存提供程序
v1.0.0
2015-04-10 07:11 UTC
Requires
- php: >=5.5
- doctrine/cache: ~1.4
- pimple/pimple: ~3.0
This package is not auto-updated.
Last update: 2024-09-14 17:53:31 UTC
README
为 Silex 应用程序提供 doctrine 缓存
要求
- PHP >= 5.5
- Pimple >= 3.0
- Doctrine/Cache >= 1.4
安装
composer require jowy/silex-cache-service-provider
用法
$container = new Container() $$container->register(new CacheServiceProvider(), [ "cache.driver" => "array|filesystem|apc|xcache|redis|memcache|memcached", "cache.options" => [ "namespace" => "your-cache-namespace", "directory" => "set-this-if-only-you-select-filesystem-driver", "host" => "only-for-redis-memcached-memcache", "port" => "only-for-redis-memcached-memcache", "password" => "if-any" ] ]); $cache = $this->container["cache.factory"]; $this->assertInstanceOf(Cache::class, $cache);
许可协议
MIT,见 LICENSE