Skip to content

Commit

Permalink
Merge pull request #44 from TheDragonCode/2.x
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
Andrey Helldar committed Feb 24, 2022
2 parents 14deca9 + 224960c commit ed35f58
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ $cache->put(static fn() => 'Some value');
$cache->put('Some value');
// Contains cached `Some value`

$cache->remember(static fn() => 'Some value');
// or
$cache->remember('Some value');
// Contains cached `Some value`

$cache->get();
// Returns cached `Some value`

Expand All @@ -170,6 +175,11 @@ $cache->put(static fn() => $user);
$cache->put($user);
// Contains cached `$user`

$cache->remember(static fn() => $user);
// or
$cache->remember($user);
// Contains cached `$user`

$cache->get();
// Returns User model

Expand Down

0 comments on commit ed35f58

Please sign in to comment.