public function setHook()
    {
        Hook::subscribe(Hook::SHUTDOWN_HOOK, [$this, 'saveCacheHook'], 10);

        foreach ($this->repository as $name => $cache)
            $this->checkExpiry($name);
    }
public function setHook()
    {
        Hook::subscribe(Hook::SHUTDOWN_HOOK, [$this, 'saveCacheHook'], 10);

        foreach ($this->repository as $name => $cache)
            $this->checkExpiry($name);
    }
public function setHook ( ) { Hook :: subscribe ( Hook :: SHUTDOWN_HOOK , [ $ this , 'saveCacheHook' ] , 10 ) ; foreach ( $ this -> repository as $ name => $ cache ) $ this -> checkExpiry ( $ name ) ; }
Add the hook after the configuration has been loaded, and apply invalidation to the
cache once it times out.
Add the hook after the configuration has been loaded and apply invalidation to the cache once it times out .