[pLog-svn] r1760 - plog/branches/plog-1.1-ben/class/dao

ork at devel.plogworld.net ork at devel.plogworld.net
Tue Apr 5 21:57:27 GMT 2005


Author: ork
Date: 2005-04-05 21:57:26 +0000 (Tue, 05 Apr 2005)
New Revision: 1760

Modified:
   plog/branches/plog-1.1-ben/class/dao/model.class.php
Log:
cache optional


Modified: plog/branches/plog-1.1-ben/class/dao/model.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/dao/model.class.php	2005-04-05 21:53:48 UTC (rev 1759)
+++ plog/branches/plog-1.1-ben/class/dao/model.class.php	2005-04-05 21:57:26 UTC (rev 1760)
@@ -67,13 +67,18 @@
 
         /**
          * So far, it only initializes the connection to the database, using the ADOdb API.
+         *
+         * @param useCache Some object might not need a cache and can disable it by passing false
          */
-        function Model()
+        function Model( $useCache = true )
         {
-            include_once( PLOG_CLASS_PATH . "class/cache/cachemanager.class.php" );
             $this->Object();
-            // allow a cache for all dao objects
-            $this->_cache =& CacheManager::getCache();
+
+            if ( $useCache ) {
+                // allow a cache for all dao objects
+                include_once( PLOG_CLASS_PATH . "class/cache/cachemanager.class.php" );
+                $this->_cache =& CacheManager::getCache();
+            }
         }
 
         /**




More information about the pLog-svn mailing list