當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CacheInterface::remove方法代碼示例

本文整理匯總了PHP中Magento\Framework\App\CacheInterface::remove方法的典型用法代碼示例。如果您正苦於以下問題:PHP CacheInterface::remove方法的具體用法?PHP CacheInterface::remove怎麽用?PHP CacheInterface::remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Framework\App\CacheInterface的用法示例。


在下文中一共展示了CacheInterface::remove方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: delete

 /**
  * @param CardInterface $cardInterface
  * @return bool
  * @throws LocalizedException
  */
 public function delete(CardInterface $cardInterface)
 {
     $cardId = $cardInterface->getCardId();
     $customerId = $cardInterface->getCustomerId();
     try {
         $deleted = $this->cardAdapter->delete($customerId, $cardId);
     } catch (OpenpayException $e) {
         throw new LocalizedException(__($e->getDescription()), $e);
     }
     $cacheIdentifier = $this->getCacheIdentifier($customerId);
     $this->cache->remove($cacheIdentifier);
     return $deleted;
 }
開發者ID:degaray,項目名稱:openpay-magento2-module,代碼行數:18,代碼來源:OpenpayCardRepository.php

示例2: setUrlClassName

 /**
  * Set url class name for store 'admin'
  *
  * @param \Magento\Framework\Event\Observer $observer
  * @return $this
  */
 public function setUrlClassName(\Magento\Framework\Event\Observer $observer)
 {
     /** @var $storeCollection \Magento\Store\Model\Resource\Store\Collection */
     $storeCollection = $observer->getEvent()->getStoreCollection();
     /** @var $store \Magento\Store\Model\Store */
     foreach ($storeCollection as $store) {
         if ($store->getId() == 0) {
             $store->setUrlClassName('Magento\\Backend\\Model\\UrlInterface');
             break;
         }
     }
     $this->cache->remove(\Magento\AdminNotification\Model\System\Message\Security::VERIFICATION_RESULT_CACHE_KEY);
     return $this;
 }
開發者ID:Atlis,項目名稱:docker-magento2,代碼行數:20,代碼來源:Observer.php

示例3: clearCustomerCache

 /**
  * @param string $openpayCustomerId
  * @return bool
  */
 public function clearCustomerCache($openpayCustomerId)
 {
     $cacheIdentifier = $this->getCacheIdentifier($openpayCustomerId);
     return $this->cache->remove($cacheIdentifier);
 }
開發者ID:degaray,項目名稱:openpay-magento2-module,代碼行數:9,代碼來源:OpenpayCustomerRepository.php


注:本文中的Magento\Framework\App\CacheInterface::remove方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。