Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,23 @@ $res = $cache->set($key, $x);

// get
$y = $cache->get($key); // the value of $y is 8



//test with object

$foo = new Foo(); //Foo implements Cacheable
$foo->x = 5;
$keyFoo = 'key_foo';
$resFoo = $cache->set($keyFoo, $foo);
$fooCache = $cache->get($keyFoo);

$testEqual = $keyFoo === $foo; //$testEquals could be false
$testEqualX = $keyFoo->x === $foo->x; //testEqualX is true
```



### Multi cache level

Example with apcu cache used with maximum priority and redis cache used with lower priority
Expand Down