Skip to content

Commit

Permalink
Fixing README
Browse files Browse the repository at this point in the history
  • Loading branch information
moufmouf committed Jun 20, 2019
1 parent c71f590 commit e691d29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,12 @@ $fileBoundCache = new FileBoundCache($psr16Cache);
$classBoundCache = new ClassBoundMemoryAdapter(new ClassBoundCache($psr16Cache));
$classBoundCacheContract = new ClassBoundCacheContract(new ClassBoundCache($fileBoundCache));

// Put the $myDataToCache object in cache.
// If the FooBar class is modified, the cache item is purged.
$item = $classBoundCache->get(new ReflectionClass(FooBar::class), function() {
// ...
// let's return the item to be cached.
// this function is called only if the item is not in cache yet.
return $item;
});
```

Expand Down

0 comments on commit e691d29

Please sign in to comment.