本文整理汇总了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;
}
示例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;
}
示例3: clearCustomerCache
/**
* @param string $openpayCustomerId
* @return bool
*/
public function clearCustomerCache($openpayCustomerId)
{
$cacheIdentifier = $this->getCacheIdentifier($openpayCustomerId);
return $this->cache->remove($cacheIdentifier);
}