Skip to content

Commit fb36fb5

Browse files
committed
First brief readme
1 parent 9067328 commit fb36fb5

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,28 @@
1-
# DoctrineCachePoolBundle
2-
Doctrine Cache Pool Bundle
1+
# Doctrine Cache Bundle
2+
3+
This bundle registers PSR6 cache services that wraps the doctrine cache.
4+
5+
## Configuration and usage
6+
7+
```yaml
8+
9+
doctrine_cache:
10+
providers:
11+
acme_file_system_cache:
12+
extension: '.fsc'
13+
directory: '%kernel.root_dir%/var/storage/fs_cache/'
14+
type: file_system
15+
acme_apc_cache:
16+
type: apc
17+
namespace: my_ns
18+
```
19+
20+
``` php
21+
22+
/** @var CacheItemPoolInterface $cacheProvider */
23+
$cacheProvider = $this->container->get('doctrine.acme_apc_cache');
24+
25+
/** @var CacheItemInterface $item */
26+
$item = $cacheProvider->getItem('cache-key');
27+
28+
```

0 commit comments

Comments
 (0)