当前位置: 首页>>代码示例>>PHP>>正文


PHP FrontendInterface::remove方法代码示例

本文整理汇总了PHP中Magento\Framework\Cache\FrontendInterface::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP FrontendInterface::remove方法的具体用法?PHP FrontendInterface::remove怎么用?PHP FrontendInterface::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Framework\Cache\FrontendInterface的用法示例。


在下文中一共展示了FrontendInterface::remove方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

 function it_removes_all_items_by_ids()
 {
     $this->cacheFrontend->remove('prefix_key1')->willReturn(true)->shouldBeCalled();
     $this->cacheFrontend->remove('prefix_key2')->willReturn(true)->shouldBeCalled();
     $this->cacheFrontend->remove('prefix_key3')->willReturn(true)->shouldBeCalled();
     $this->deleteItems(['key1', 'key2', 'key3'])->shouldReturn(true);
 }
开发者ID:ecomdev,项目名称:magento-psr6-bridge,代码行数:7,代码来源:CacheItemPoolSpec.php

示例2: remove

 /**
  * Remove cached data by identifier
  *
  * @param string $identifier
  * @return bool
  */
 public function remove($identifier)
 {
     return $this->_frontend->remove($identifier);
 }
开发者ID:,项目名称:,代码行数:10,代码来源:

示例3: resetDdlCache

 /**
  * Reset cached DDL data from cache
  * if table name is null - reset all cached DDL data
  *
  * @param string $tableName
  * @param string $schemaName OPTIONAL
  * @return $this
  */
 public function resetDdlCache($tableName = null, $schemaName = null)
 {
     if (!$this->_isDdlCacheAllowed) {
         return $this;
     }
     if ($tableName === null) {
         $this->_ddlCache = array();
         if ($this->_cacheAdapter) {
             $this->_cacheAdapter->clean(\Zend_Cache::CLEANING_MODE_MATCHING_TAG, array(self::DDL_CACHE_TAG));
         }
     } else {
         $cacheKey = $this->_getTableName($tableName, $schemaName);
         $ddlTypes = array(self::DDL_DESCRIBE, self::DDL_CREATE, self::DDL_INDEX, self::DDL_FOREIGN_KEY);
         foreach ($ddlTypes as $ddlType) {
             unset($this->_ddlCache[$ddlType][$cacheKey]);
         }
         if ($this->_cacheAdapter) {
             foreach ($ddlTypes as $ddlType) {
                 $cacheId = $this->_getCacheId($cacheKey, $ddlType);
                 $this->_cacheAdapter->remove($cacheId);
             }
         }
     }
     return $this;
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:33,代码来源:Mysql.php

示例4: save

 /**
  * Save configurable product depended data
  *
  * @param \Magento\Catalog\Model\Product $product
  * @return $this
  * @throws \InvalidArgumentException
  * @deprecated the \Magento\ConfigurableProduct\Model\Product\SaveHandler::execute should be used instead
  */
 public function save($product)
 {
     parent::save($product);
     $cacheId = __CLASS__ . $product->getId();
     $this->cache->remove($cacheId);
     $extensionAttributes = $product->getExtensionAttributes();
     // this approach is needed for 3rd-party extensions which are not using extension attributes
     if (empty($extensionAttributes->getConfigurableProductOptions())) {
         $this->saveConfigurableOptions($product);
     }
     if (empty($extensionAttributes->getConfigurableProductLinks())) {
         $this->saveRelatedProducts($product);
     }
     return $this;
 }
开发者ID:BlackIkeEagle,项目名称:magento2-continuousphp,代码行数:23,代码来源:Configurable.php

示例5: deleteItem

 /**
  * Removes the item from the pool.
  *
  * @param string $key
  *   The key for which to delete
  *
  * @throws InvalidArgumentException
  *   If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
  *   MUST be thrown.
  *
  * @return bool
  *   True if the item was successfully removed. False if there was an error.
  */
 public function deleteItem($key)
 {
     return $this->cacheFrontend->remove($this->prepareKey($key));
 }
开发者ID:ecomdev,项目名称:magento-psr6-bridge,代码行数:17,代码来源:CacheItemPool.php

示例6: remove

 /**
  * Remove notification from cache
  *
  * @param string $notificationType
  * @param string $customerId
  * @return void
  */
 public function remove($notificationType, $customerId)
 {
     $this->cache->remove($this->getCacheKey($notificationType, $customerId));
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:11,代码来源:NotificationStorage.php

示例7: save

 /**
  * Save configurable product depended data
  *
  * @param \Magento\Catalog\Model\Product $product
  * @return $this
  * @throws \InvalidArgumentException
  * @deprecated the \Magento\ConfigurableProduct\Model\Product\SaveHandler::execute should be used instead
  */
 public function save($product)
 {
     parent::save($product);
     $metadata = $this->getMetadataPool()->getMetadata(ProductInterface::class);
     $cacheId = __CLASS__ . $product->getData($metadata->getLinkField()) . '_' . $product->getStoreId();
     $this->cache->remove($cacheId);
     $extensionAttributes = $product->getExtensionAttributes();
     // this approach is needed for 3rd-party extensions which are not using extension attributes
     if (empty($extensionAttributes->getConfigurableProductOptions())) {
         $this->saveConfigurableOptions($product);
     }
     if (empty($extensionAttributes->getConfigurableProductLinks())) {
         $this->saveRelatedProducts($product);
     }
     return $this;
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:24,代码来源:Configurable.php

示例8: persist

 /**
  * Save the current statuses (enabled/disabled) of cache types to the persistent storage
  *
  * @return void
  */
 public function persist()
 {
     $this->_options->saveAllOptions($this->_typeStatuses);
     $this->_cacheFrontend->remove(self::CACHE_ID);
 }
开发者ID:pavelnovitsky,项目名称:magento2,代码行数:10,代码来源:State.php


注:本文中的Magento\Framework\Cache\FrontendInterface::remove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。