Skip to content

Commit 8cd1e4d

Browse files
committed
Merge pull request #18 from php-cache/docs
Updated readme with a reference to php-cache.com
2 parents 5cc8045 + ba2c4d7 commit 8cd1e4d

File tree

1 file changed

+7
-43
lines changed

1 file changed

+7
-43
lines changed

README.md

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
# Adapter Bundle
2-
[![Build Status](https://travis-ci.org/php-cache/adapter-bundle.png?branch=master)](https://travis-ci.org/php-cache/adapter-bundle)
1+
# PSR-6 Cache adapter Bundle
2+
[![Latest Stable Version](https://poser.pugx.org/cache/adapter-bundle/v/stable)](https://packagist.org/packages/cache/adapter-bundle) [![codecov.io](https://codecov.io/github/php-cache/adapter-bundle/coverage.svg?branch=master)](https://codecov.io/github/php-cache/adapter-bundle?branch=master) [![Build Status](https://travis-ci.org/php-cache/adapter-bundle.svg?branch=master)](https://travis-ci.org/php-cache/adapter-bundle) [![Total Downloads](https://poser.pugx.org/cache/adapter-bundle/downloads)](https://packagist.org/packages/cache/adapter-bundle) [![Monthly Downloads](https://poser.pugx.org/cache/adapter-bundle/d/monthly.png)](https://packagist.org/packages/cache/adapter-bundle) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/21963379-2b15-4cc4-bdf6-0f98aa292f8a/mini.png)](https://insight.sensiolabs.com/projects/21963379-2b15-4cc4-bdf6-0f98aa292f8a) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
33

4-
This bundle helps you configurate and register PSR-6 cache services.
4+
5+
This bundle helps you configurate and register PSR-6 cache services. It is a part of the PHP Cache organisation. To read about
6+
features like tagging and hierarchy support please read the shared documentation at [www.php-cache.com](http://www.php-cache.com).
7+
58

69
### To Install
710

@@ -20,43 +23,4 @@ $bundles(
2023
);
2124
```
2225

23-
24-
### Configuration
25-
26-
```yaml
27-
cache_adapter:
28-
providers:
29-
acme_memcached:
30-
factory: cache.factory.memcached
31-
options:
32-
persistent: true # Boolean or persistent_id
33-
namespace: mc
34-
hosts:
35-
- { host: localhost, port: 11211 }
36-
```
37-
38-
### Usage
39-
40-
When using a configuration like below, you will get a service with the id `cache.provider.acme_redis`.
41-
```yaml
42-
cache_adapter:
43-
providers:
44-
acme_redis:
45-
factory: cache.factory.redis
46-
```
47-
48-
Use the new service as any PSR-6 cache.
49-
50-
``` php
51-
/** @var CacheItemPoolInterface $cache */
52-
$cache = $this->container->get('cache.provider.acme_redis');
53-
// Or
54-
$cache = $this->container->get('cache'); // This is either the `default` provider, or the first provider in the config
55-
56-
/** @var CacheItemInterface $item */
57-
$item = $cache->getItem('cache-key');
58-
$item->set('foobar');
59-
$item->expiresAfter(3600);
60-
$cache->save($item);
61-
```
62-
26+
Read the documentation at [www.php-cache.com/symfony/adapter-bundle](http://www.php-cache.com/en/latest/symfony/adapter-bundle/).

0 commit comments

Comments
 (0)