Domanda

I am using Symfony 2.3 for my application. As suggested in this topic : How to cache in Symfony 2? I am using the Doctrine APC Cache from Doctrine Commons package. I understand how to use it then, to store data. For my application, I am using it to store translations of strings coming from my Database, in order to reduce DB transactions useless usages.

However, let's suppose that I want to update this translation. I'd like then to clear the related data in cache, related to this translation, in order to update it to the cache. How can I do that?

È stato utile?

Soluzione

$this->get('cache')->delete($cachedKey);

does not works ?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top