Skip to content

Commit 02f26ce

Browse files
committed
Added configuration examples
1 parent 07ef805 commit 02f26ce

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,36 @@ $bundles(
2727
```yaml
2828
cache_adapter_doctrine:
2929
providers:
30+
acme_memcached:
31+
type: memcached
32+
persistent: true # Boolean or persistent_id
33+
namespace: mc
34+
hosts:
35+
- { host: localhost, port: 11211 }
36+
acme_redis:
37+
type: redis
38+
hosts:
39+
main:
40+
host: 127.0.0.1
41+
port: 6379
3042
acme_file_system_cache:
43+
type: file_system
3144
extension: '.fsc'
3245
directory: '%kernel.root_dir%/var/storage/fs_cache/'
33-
type: file_system
46+
acme_php_file_cache:
47+
type: php_file
48+
extension: '.cache'
49+
directory: '%kernel.root_dir%/var/storage/'
50+
acme_array_cache:
51+
type: array
3452
acme_apc_cache:
3553
type: apc
3654
namespace: my_ns
3755
```
3856
3957
### Usage
4058
41-
When using a configuration like below, you will get an service with the id `cache.provider.acme_apc_cache`.
59+
When using a configuration like below, you will get a service with the id `cache.provider.acme_apc_cache`.
4260
```yaml
4361
cache_adapter_doctrine:
4462
providers:
@@ -60,4 +78,4 @@ $item->expiresAfter(3600);
6078
$cache->save($item);
6179
```
6280

63-
[DoctrineAdapter]: https://github.com/php-cache/doctrine-adapter
81+
[DoctrineAdapter]: https://github.com/php-cache/doctrine-adapter

0 commit comments

Comments
 (0)