Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
byjg committed Apr 8, 2018
2 parents 58d9a24 + a317da6 commit e79b80d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@ To create a new Cache Instance just create the proper cache engine and use it:
$cache = new \ByJG\Cache\Psr16\FileSystemCacheEngine();

// And use it:
$object = $cache->get('key');
$cache->set('key', 'value');
if ($cache->has('key')) {
//...
// Do the complex code to get the value to be cached
$object = callComplexCode();

// Save to cache
$cache->set('key', $object);
};
$object = $cache->get('key');
```

See more PSR-16 examples [here](docs/basic-usage-psr16-simplecache.md)

## Cache Engine PSR-6 compliant

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

See more PSR-6 examples [here](docs/basic-usage-psr6-cachepool.md)

## List of Avaiable Factory Commands

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

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

See log examples [here](docs/setup-log-handler.md)

## Install

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

0 comments on commit e79b80d

Please sign in to comment.