public function init() { if ($this->cache->exists(__CLASS__)) { $this->stats = $this->cache->get(__CLASS__); } }
/** * @param Cache $cache */ public function init(Cache $cache) { if ($cache->exists(get_class($this))) { $this->cache = $cache->get(get_class($this)); } }