File tree 1 file changed +15
-8
lines changed
1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change 1
- DominoCacheStore
2
- =================
1
+ # DominoCacheStore
2
+
3
3
[ ![ Build Status] ( https://travis-ci.org/SNakano/CacheStore.png )] ( https://travis-ci.org/SNakano/CacheStore )
4
4
[ ![ Latest Stable Version] ( https://poser.pugx.org/snakano/cache-store/v/stable.svg )] ( https://packagist.org/packages/snakano/cache-store )
5
5
[ ![ Total Downloads] ( https://poser.pugx.org/snakano/cache-store/downloads.svg )] ( https://packagist.org/packages/snakano/cache-store )
@@ -12,8 +12,7 @@ provides a generic way to cache any data.
12
12
- support namespace. (use namespace delete)
13
13
14
14
15
- Install
16
- -------
15
+ ## Install
17
16
18
17
using Composer(recommended):
19
18
@@ -27,8 +26,7 @@ using Composer(recommended):
27
26
or cloning this repository.
28
27
29
28
30
- Usage
31
- -----
29
+ ## Usage
32
30
33
31
``` php
34
32
// configure cache setting.
@@ -89,9 +87,18 @@ $storage->get('ns2', 'key1');
89
87
$storage->clearAll();
90
88
$storage->get('ns2', 'key1');
91
89
# => null
90
+
91
+ // disable caching at runtime
92
+ Domino\CacheStore\Factory::disableCaching();
93
+ // since caching is disabled, the factory will return an instance of "NoCache"
94
+ $storage = Domino\CacheStore\Factory::factory('memcached');
95
+
96
+ // enable caching at runtime
97
+ Domino\CacheStore\Factory::enableCaching();
98
+ // since caching is enabled again, the factory will return an instance of "Memcached"
99
+ $storage = Domino\CacheStore\Factory::factory('memcached');
92
100
```
93
101
94
- License
95
- -------
102
+ ## License
96
103
97
104
MIT license.
You can’t perform that action at this time.
0 commit comments