Skip to content

Commit

Permalink
Merge branch 'master' of github.com:terrylinooo/simple-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
terrylinooo committed Sep 29, 2020
2 parents 18a1b03 + e64f86a commit ea33707
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,25 +180,25 @@ public function get(string $key, mixed $default = null): mixed
Example:

```php
echo $cache->get('foo', 'placeholder'));
echo $cache->get('foo', 'placeholder');
// bar

sleep(301);

echo $cache->get('foo', 'placeholder'));
echo $cache->get('foo', 'placeholder');
// placeholder

echo $cache->get('foo');
// null

echo $cache->get('foo2', 'placeholder'));
echo $cache->get('foo2', 'placeholder');
// bar2

$example = $cache->get('foo3', 'placeholder'));
$example = $cache->get('foo3', 'placeholder');
var_dump($example);
// string(11) "placeholder"

$example = $cache->get('foo4', 'placeholder'));
$example = $cache->get('foo4', 'placeholder');
var_dump($example);
/*
array(2) {
Expand Down Expand Up @@ -304,7 +304,7 @@ public function deleteMultiple(array $keys): bool
Example:

```php
if ($cache->deleteMultiple((['bar', 'bar2')) {
if ($cache->deleteMultiple(['bar', 'bar2'])) {
echo 'bar and bar2 have been deleted successfully.';
} else {
echo 'Failed to delete keys bar or bar2.';
Expand Down

0 comments on commit ea33707

Please sign in to comment.