when i do
return $this->_scopeConfig->getValue("config/user/email", \Magento\Store\Model\ScopeInterface::SCOPE_STORE); Gets the value of the cache and is not correct. How can I make it skip the cache?
Inject the following dependency into your constructor
/** * @var \Magento\Framework\App\Cache\TypeListInterface */ protected $cacheTypeList; /** * @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList */ public function __construct( \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList ) { $this->cacheTypeList = $cacheTypeList; } and then try to add before you return your new config value the following lines
$this->cacheTypeList->cleanType(\Magento\Framework\App\Cache\Type\Config::TYPE_IDENTIFIER); $this->cacheTypeList->cleanType(\Magento\PageCache\Model\Cache\Type::TYPE_IDENTIFIER);
$ bin/magento cache:cleanshould update the configuration cache. Or you can do it in the Admin Cache Management area as well.