From: Simon H. <sim...@us...> - 2010-11-18 14:21:23
|
Update of /cvsroot/stack/stack-dev/lib/database In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv5138/lib/database Modified Files: Tag: item_state_separation StackDBCache.php Log Message: Index: StackDBCache.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/StackDBCache.php,v retrieving revision 1.12.6.2.2.4 retrieving revision 1.12.6.2.2.5 diff -C2 -d -r1.12.6.2.2.4 -r1.12.6.2.2.5 *** StackDBCache.php 16 Nov 2010 19:04:31 -0000 1.12.6.2.2.4 --- StackDBCache.php 18 Nov 2010 14:21:14 -0000 1.12.6.2.2.5 *************** *** 46,51 **** if($transition == NULL) { // go ahead and extend cache ! //$state->trimToStateonly(); ! $this->logger->debug("state in add: ".print_r($state, true)); // add the new state --- 46,52 ---- if($transition == NULL) { // go ahead and extend cache ! //$state->reduceToState(); ! $this->logger->debug("state size in add: ".strlen($this->base64_serialize($state))); ! $this->logger->debug("DI in add(): ".print_r($state, 1)); // add the new state *************** *** 193,200 **** //$this->logger->debug('in deployCache, id='.$id); ! //$logger->debug("pre-reduce size:".strlen($db->base64_serialize($instance))); $instance->reduceToState(); //$logger->debug("whole DI:".print_r($instance, 1)); ! //$logger->debug("post-reduce size:".strlen($db->base64_serialize($instance))); $db->query("UPDATE display_cache" . --- 194,201 ---- //$this->logger->debug('in deployCache, id='.$id); ! $logger->debug("pre-reduce size:".strlen($db->base64_serialize($instance))); $instance->reduceToState(); //$logger->debug("whole DI:".print_r($instance, 1)); ! $logger->debug("post-reduce size:".strlen($db->base64_serialize($instance))); $db->query("UPDATE display_cache" . *************** *** 284,288 **** public function getDisplayItem($id) { $this->query("SELECT state FROM display_cache WHERE id = $id"); ! return $this->base64_unserialize($this->result(0, 'state')); } --- 285,290 ---- public function getDisplayItem($id) { $this->query("SELECT state FROM display_cache WHERE id = $id"); ! $state = $this->base64_unserialize($this->result(0, 'state')); ! return $state; } |