/** * @param array $configs * * @return void */ public function changeConfigs(array $configs) { foreach ($configs as $config) { $config = array_merge($this->defaultConfig, $config); if ($this->isValidConfig($config)) { $this->changeConfig($config['path'], $config['value'], $config['scope_type'], $config['scope_code']); } } $this->cache->clean(); }
/** * Clear attributes cache * * @return bool */ public function clear() { unset($this->attributeInstances); if ($this->isAttributeCacheEnabled()) { $this->cache->clean([\Magento\Eav\Model\Cache\Type::CACHE_TAG, \Magento\Eav\Model\Entity\Attribute::CACHE_TAG]); } return true; }
/** * Reset object state * * @return $this */ public function clear() { $this->_entityTypeData = null; $this->_attributeData = null; $this->_objects = null; $this->_references = null; $this->_attributeCodes = null; $this->_cache->clean([\Magento\Eav\Model\Cache\Type::CACHE_TAG, \Magento\Eav\Model\Entity\Attribute::CACHE_TAG]); return $this; }
/** * Process saving new encryption key * * @return void */ public function executeInternal() { try { $key = null; if (0 == $this->getRequest()->getPost('generate_random')) { $key = $this->getRequest()->getPost('crypt_key'); if (empty($key)) { throw new \Exception(__('Please enter an encryption key.')); } $this->encryptor->validateKey($key); } $newKey = $this->change->changeEncryptionKey($key); $this->messageManager->addSuccessMessage(__('The encryption key has been changed.')); if (!$key) { $this->messageManager->addNoticeMessage(__('This is your new encryption key: <span style="font-family:monospace;">%1</span>. ' . 'Be sure to write it down and take good care of it!', $newKey)); } $this->cache->clean(); } catch (\Exception $e) { $this->messageManager->addErrorMessage($e->getMessage()); $this->_session->setFormData(['crypt_key' => $key]); } $this->_redirect('adminhtml/*/'); }
/** * Remove model object related cache * * @return $this */ public function cleanModelCache() { $tags = $this->getCacheTags(); if ($tags !== false) { $this->_cacheManager->clean($tags); } return $this; }
/** * Move tree after * * @return $this */ protected function _afterMove() { $this->_cache->clean([\Magento\Catalog\Model\Category::CACHE_TAG]); return $this; }
/** * Refresh admin menu cache etc. * * @return void */ public function renewSecretUrls() { $this->_cache->clean([\Magento\Backend\Block\Menu::CACHE_TAGS]); }
/** * Clean cache * * @return $this */ public function cleanCache() { $this->cache->clean([\Magento\Eav\Model\Cache\Type::CACHE_TAG]); return $this; }
/** * Clean cache * * @return $this */ public function cleanCache() { $this->_cache->clean(array(\Magento\Eav\Model\Cache\Type::CACHE_TAG)); return $this; }
/** * Ensure changes in the configuration, if any, take effect * * @return void */ protected function _refreshConfig() { $this->_cache->clean(); $this->_config->reinit(); }
/** * Clean the cache by index identifier and store. * * @param string $indexIdentifier Index identifier. * @param string $storeId Store id. * * @return void */ public function cleanIndexCache($indexIdentifier, $storeId) { $cacheTags = $this->getCacheTags($indexIdentifier, $storeId); $this->cache->clean($cacheTags); }
public function cleanDownCachedRates() { $this->cache->clean(\Zend_Cache::CLEANING_MODE_MATCHING_TAG, [self::CACHE_TAG]); }