Skip to content

Commit

Permalink
Small tweaks to README
Browse files Browse the repository at this point in the history
  • Loading branch information
biohzrdmx committed Mar 31, 2021
1 parent ae666ec commit a9455a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ And that's it. Easy peasy.
Usually all those operations are executed in the following form:

```php
use Cacher\Cacher;

$cacher = new Cacher(BASE_DIR . '/cache');

if ( $cacher->isCached('results') ) {
$results = $cacher->retrieve('results');
$results = $cacher->retrieve('results');
} else {
$results = fetchResultsFromSomeSource();
$cacher->store('results', $results);
$results = fetchResultsFromSomeSource();
$cacher->store('results', $results);
}
```

Expand Down

0 comments on commit a9455a1

Please sign in to comment.