centurion-project/Centurion — pull request #21 by frenchcomp (2012-02-01 21:26:19+00:00)
Title: Fix translation adapter

Translation_Model_Translate_Adapter_Array can not load the cache identify by "Translation_Model_Translate_Adapter_Array", because :

* During backup, the id is prefixed by the local. (option "cache_id_prefix" defined Translation_Controller_Action_Helper_ManageLanguageParam).
* But the recovery of the cache is performed before initializing of ManageLanguageParam and the definition of "cache_id_prefix".
* So, the id during backup if "[local]_Translation_Model_Translate_Adapter_Array_Cache" (by example : fr_Translation_Model_Translate_Adapter_Array_Cache) and during recovery "Translation_Model_Translate_Adapter_Array_Cache".

This patch migrate the cache recovery outer of the adapter's constructer in a public method, called by the helper ManageLanguageParam, after he found the local.

So, I a "getCache" on $this->_tagUidTable in the adapter when it checks if a translation uid is linked with a tag.

These patches have halved the number of my queries to my DBMS.