|
From: <gem...@li...> - 2011-12-01 08:21:00
|
Revision: 321
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=321&view=rev
Author: mennodekker
Date: 2011-12-01 08:20:54 +0000 (Thu, 01 Dec 2011)
Log Message:
-----------
Don't cache options as they change a lot, see http://framework.zend.com/issues/browse/ZF-9850
Modified Paths:
--------------
branches/userloader/classes/Zend/Translate/Adapter.php
Modified: branches/userloader/classes/Zend/Translate/Adapter.php
===================================================================
--- branches/userloader/classes/Zend/Translate/Adapter.php 2011-12-01 08:14:56 UTC (rev 320)
+++ branches/userloader/classes/Zend/Translate/Adapter.php 2011-12-01 08:20:54 UTC (rev 321)
@@ -33,6 +33,10 @@
/**
* Basic adapter class for each translation source adapter
*
+ * THIS CLASS IS ALTERED FOR THE GEMSTRACKER PROJECT TO NEVER CACHE THE OPTIONS AS THEY CHANGE
+ * ON EVERY REQUEST AND THIS COUSES TROUBLE AS DESCRIBED AND IGNORED BY ZEND IN
+ * http://framework.zend.com/issues/browse/ZF-9850
+ *
* @category Zend
* @package Zend_Translate
* @subpackage Zend_Translate_Adapter
@@ -149,13 +153,13 @@
unset($options['cache']);
}
- if (isset(self::$_cache)) {
+ /*if (isset(self::$_cache)) {
$id = 'Zend_Translate_' . $this->toString() . '_Options';
$result = self::$_cache->load($id);
if ($result) {
$this->_options = $result;
}
- }
+ }*/
if (empty($options['locale']) || ($options['locale'] === "auto")) {
$this->_automatic = true;
@@ -369,14 +373,14 @@
$this->setLocale($locale);
}
- if (isset(self::$_cache) and ($change == true)) {
+ /*if (isset(self::$_cache) and ($change == true)) {
$id = 'Zend_Translate_' . $this->toString() . '_Options';
if (self::$_cacheTags) {
self::$_cache->save($this->_options, $id, array($this->_options['tag']));
} else {
self::$_cache->save($this->_options, $id);
}
- }
+ }*/
return $this;
}
@@ -461,14 +465,14 @@
if ($this->_options['locale'] != $locale) {
$this->_options['locale'] = $locale;
- if (isset(self::$_cache)) {
+ /*if (isset(self::$_cache)) {
$id = 'Zend_Translate_' . $this->toString() . '_Options';
if (self::$_cacheTags) {
self::$_cache->save($this->_options, $id, array($this->_options['tag']));
} else {
self::$_cache->save($this->_options, $id);
}
- }
+ }*/
}
return $this;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|