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


In Magento way you can achieve by below code:

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

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 and acknowledge you have read our privacy policy.

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