[pLog-svn] r3206 - plog/trunk/class/cache
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Fri Apr 7 23:28:35 GMT 2006
Author: oscar
Date: 2006-04-07 23:28:35 +0000 (Fri, 07 Apr 2006)
New Revision: 3206
Modified:
plog/trunk/class/cache/cache.class.php
Log:
fixed an issue regarding the cache, where the cache kept growing and growing every time Cache::setMultipleData was being called.
Modified: plog/trunk/class/cache/cache.class.php
===================================================================
--- plog/trunk/class/cache/cache.class.php 2006-04-07 19:57:20 UTC (rev 3205)
+++ plog/trunk/class/cache/cache.class.php 2006-04-07 23:28:35 UTC (rev 3206)
@@ -46,7 +46,16 @@
$currentData = $this->getData( $id, $group );
if( !$currentData ) $currentData = Array();
- $currentData[] = $data;
+
+ /**
+ * :TODO:
+ * It's clear that we're only going to cache DbObjects using this method
+ * but what happens if we don't? Should we force developers to provide a method
+ * to uniquely identify their own objects? We definitely need a unique id here so that
+ * the array doesn't grow forever...
+ */
+ $currentData[$data->getId()] = $data;
+
return $this->cache->save( $currentData, $id, "$group" );
} else
return true;
More information about the pLog-svn
mailing list