Pimcore\Cache\Backend\Memcached::checkCacheConsistency PHP Метод

checkCacheConsistency() защищенный Метод

protected checkCacheConsistency ( ) : void
Результат void
    protected function checkCacheConsistency()
    {
        // if the cache_tags table is empty, flush the cache
        // reason: the cache tags are stored in a MEMORY table, that means that a restart of the mysql server causes the loss
        // of all data in this table but the cache still exists, so there is an inconsistency because then it's possible that
        // there are outdated or just wrong items in the cache
        if (!$this->checkedCacheConsistency) {
            $this->checkedCacheConsistency = true;
            $res = $this->getDb()->fetchOne("SELECT id FROM cache_tags LIMIT 1");
            if (!$res) {
                $this->clean(\Zend_Cache::CLEANING_MODE_ALL);
            }
        }
    }