You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a simple page, there are more than 67 invocation like below
Serving "yum_translations_en_us_yum" from cache trace cache 10:34:22.391621
Serving "yum_translations_en_us_yum" from cache trace cache 10:34:22.392180
Serving "yum_translations_en_us_yum" from cache trace cache 10:34:22.392729
...
Obviously, it is expensive.
So, maybe there could be some other strategy like what I have done in my project.(But I have to add namespace and etc. into the source code in Yum.php . Expecting better ideas)
...
class Yum extends yum\user\models\Yum
...
public static $messages;//new
...
public static function t
...
if(isset(self::$messages[$language]) and isset(self::$messages[$language][$category]) ) {
$messages = self::$messages[$language][$category];//new
} else if(Yii::app()->cache) {
$messages = Yii::app()->cache->get($cache_id);
self::$messages[$language][$category] = $messages;//new
}
...
if(Yii::app()->cache)
Yii::app()->cache->set($cache_id, $messages);
self::$messages[$language][$category] = $messages; //new
...
The text was updated successfully, but these errors were encountered:
In a simple page, there are more than 67 invocation like below
Obviously, it is expensive.
So, maybe there could be some other strategy like what I have done in my project.(But I have to add namespace and etc. into the source code in Yum.php . Expecting better ideas)
The text was updated successfully, but these errors were encountered: