summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--framework/Caching/TDbCache.php5
2 files changed, 2 insertions, 4 deletions
diff --git a/HISTORY b/HISTORY
index 67d072f2..0cc7f208 100644
--- a/HISTORY
+++ b/HISTORY
@@ -21,6 +21,7 @@ BUG: Issue #232 - Could not change enable-state of TActiveCheckBox via Ajax call
ENH: Issue #235 - Progressive rendering not possible (Gabor)
BUG: Issue #240 - TXCache has wrong flush() implementation (ctrlaltca)
BUG: Issue #243 - Cross-site scripting issue in TForm (ctrlaltca)
+BUG: Issue #254 - TDbCache should use hash index for the cache key (ctrlaltca)
BUG: Issue #265 - Using scroll wheel causes NaN values in TDatePicker (Gabor)
BUG: Issue #301 - Fixed a bug in TActiveFileUpload (ctrlaltca)
ENH: Issue #337 - Prado serialization optimizations (Gabor)
diff --git a/framework/Caching/TDbCache.php b/framework/Caching/TDbCache.php
index 90aa88c6..834d2eb4 100644
--- a/framework/Caching/TDbCache.php
+++ b/framework/Caching/TDbCache.php
@@ -217,10 +217,7 @@ class TDbCache extends TCache
else
$blob='BLOB';
- $sql='CREATE TABLE '.$this->_cacheTable." (itemkey CHAR(128), value $blob, expire INT)";
- $db->createCommand($sql)->execute();
-
- $sql='CREATE INDEX IX_itemkey ON ' . $this->_cacheTable . ' (itemkey)';
+ $sql='CREATE TABLE '.$this->_cacheTable." (itemkey CHAR(128) PRIMARY KEY, value $blob, expire INTEGER)";
$db->createCommand($sql)->execute();
$sql='CREATE INDEX IX_expire ON ' . $this->_cacheTable . ' (expire)';