0

When a customer changes the custom data from his account page , on the main page returns the old data, but in the database it changes , Thank You

2 Answers 2

1

In Magento way you can achieve by below code:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$cacheManager = $objectManager->create('Magento\Framework\App\Cache\Manager');
$cacheManager->clean($cacheManager->getAvailableTypes());
1

You can clear the cache programmatically by calling the \Magento\Framework\App\CacheInterface::remove() method.

Let me know if you have any confusion for implementation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.