Slide 19
Slide 19 text
WHAT IS IOC?
\
class CacheDecorator implements Storage
{
public function __construct(Cache $cache, Storage $storage)
{…}
public function store($key, $value)
{
return $this->cache->remember($key, 60, function () {
return $this->storage->get($key);
});
}
}