Skip to content

Commit e79b80d

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 58d9a24 + a317da6 commit e79b80d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,18 @@ To create a new Cache Instance just create the proper cache engine and use it:
2929
$cache = new \ByJG\Cache\Psr16\FileSystemCacheEngine();
3030

3131
// And use it:
32-
$object = $cache->get('key');
33-
$cache->set('key', 'value');
3432
if ($cache->has('key')) {
35-
//...
33+
// Do the complex code to get the value to be cached
34+
$object = callComplexCode();
35+
36+
// Save to cache
37+
$cache->set('key', $object);
3638
};
39+
$object = $cache->get('key');
3740
```
3841

42+
See more PSR-16 examples [here](docs/basic-usage-psr16-simplecache.md)
43+
3944
## Cache Engine PSR-6 compliant
4045

4146
The PSR-6 implementation use the engines defined above. PSR-6 is more verbosity and
@@ -54,6 +59,8 @@ $cachePool = \ByJG\Cache\Factory::createFilePool();
5459
$cachePool = new CachePool(new FileSystemCacheEngine());
5560
```
5661

62+
See more PSR-6 examples [here](docs/basic-usage-psr6-cachepool.md)
63+
5764
## List of Avaiable Factory Commands
5865

5966
**Note: All parameters are optional**
@@ -80,6 +87,8 @@ The Commom parameters are:
8087

8188
You can add a PSR Log compatible to the constructor in order to get Log of the operations
8289

90+
See log examples [here](docs/setup-log-handler.md)
91+
8392
## Install
8493

8594
Just type: `composer require "byjg/cache-engine=4.0.*"`

0 commit comments

Comments
 (0)