diff --git a/README.md b/README.md index 7e1da91..a30a6a7 100644 --- a/README.md +++ b/README.md @@ -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; }); ```