[pLog-svn] r4777 - plog/branches/lifetype-1.2/class/config

Jon Daley plogworld at jon.limedaley.com
Mon Feb 19 15:34:55 EST 2007


 	I haven't jumped to 1.2 yet (sorry...) but looks like you have 
done a bunch of good work this weekend!  I saw the changes based on that 
powerpoint doc - did you exhaustively search for those optimization cases, 
or is it worth looking through some more?
 	I have been pretty swamped lately - working more aggressively on 
getting my company to be my only income.
 	I'll be in Florida next week with my parents, so I won't be around 
as much on the forums.
 	For this bug change - you probably want to remove the 
debuggin print statement.


On Sun, 18 Feb 2007, oscar at devel.lifetype.net wrote:

> Author: oscar
> Date: 2007-02-18 16:51:01 -0500 (Sun, 18 Feb 2007)
> New Revision: 4777
>
> Modified:
>   plog/branches/lifetype-1.2/class/config/configdbstorage.class.php
> Log:
> minor optimization, the previous approach didn't make too much sense to me.
>
>
> Modified: plog/branches/lifetype-1.2/class/config/configdbstorage.class.php
> ===================================================================
> --- plog/branches/lifetype-1.2/class/config/configdbstorage.class.php	2007-02-18 21:25:23 UTC (rev 4776)
> +++ plog/branches/lifetype-1.2/class/config/configdbstorage.class.php	2007-02-18 21:51:01 UTC (rev 4777)
> @@ -127,18 +127,11 @@
> 		 */
>         function getValue( $key, $defaultValue = null )
>         {
> -            if (!is_object( $this->_cache )) {
> -                $this->_cache =& CacheManager::getCache();
> -            }
> -            if($this->_data == array()) {
> -                $data = $this->_data = $this->_cache->getData( CACHE_CONFIGDBSTORAGE, CACHE_GLOBAL );
> -                if ($data) {
> -                    $this->_data = $data;
> -                } else {
> -                    $this->_loadAllValuesFromDatabase();
> -                }
> -            }
> -
> +			if( (!$this->_data = $this->_cache->getData( CACHE_CONFIGDBSTORAGE, CACHE_GLOBAL ))) {
> +				print("data not in cache!");
> +				$this->_loadAllValuesFromDatabase();
> +			}
> +
>             if( array_key_exists($key, $this->_data) ) {
>                 if ($this->_data[$key] == "" || $this->_data[$key] == null) {
>                     return $defaultValue;
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

-- 
Jon Daley
http://jon.limedaley.com/

Idleness: Doing nothing with a deal of skill
-- William Cowper


More information about the pLog-svn mailing list