[pLog-svn] r1762 - in plog/branches/plog-1.1-ben/class/cache: . Cache_Lite

ork at devel.plogworld.net ork at devel.plogworld.net
Tue Apr 5 22:07:20 GMT 2005


Author: ork
Date: 2005-04-05 22:07:20 +0000 (Tue, 05 Apr 2005)
New Revision: 1762

Modified:
   plog/branches/plog-1.1-ben/class/cache/Cache_Lite/Lite.php
   plog/branches/plog-1.1-ben/class/cache/cachemanager.class.php
Log:
why not optimize the cache :) set everythin in Lite.php to the default.. this saves us a lot of time parsing the parameters given to the Cache_Lite() .. 



Modified: plog/branches/plog-1.1-ben/class/cache/Cache_Lite/Lite.php
===================================================================
--- plog/branches/plog-1.1-ben/class/cache/Cache_Lite/Lite.php	2005-04-05 22:03:34 UTC (rev 1761)
+++ plog/branches/plog-1.1-ben/class/cache/Cache_Lite/Lite.php	2005-04-05 22:07:20 UTC (rev 1762)
@@ -106,7 +106,7 @@
     *
     * @var boolean $_writeControl
     */
-    var $_readControl = true;
+    var $_readControl = false;
 
     /**
     * Type of read control (only if read control is enabled)
@@ -202,7 +202,7 @@
     *
     * @var boolean $_serialize
     */
-    var $_automaticSerialization = false;
+    var $_automaticSerialization = true;
     
     /**
     * Disable / Tune the automatic cleaning process
@@ -223,7 +223,7 @@
     *
     * @var int $_hashedDirectoryLevel
     */
-    var $_hashedDirectoryLevel = 0;
+    var $_hashedDirectoryLevel = 2;
     
     // --- Public methods ---
 
@@ -254,7 +254,10 @@
     */
     function Cache_Lite($options = array(NULL))
     {
-        $availableOptions = array('hashedDirectoryLevel', 'automaticCleaningFactor', 'automaticSerialization', 'fileNameProtection', 'memoryCaching', 'onlyMemoryCaching', 'memoryCachingLimit', 'cacheDir', 'caching', 'lifeTime', 'fileLocking', 'writeControl', 'readControl', 'readControlType', 'pearErrorMode');
+        // original options
+        // $availableOptions = array('hashedDirectoryLevel', 'automaticCleaningFactor', 'automaticSerialization', 'fileNameProtection', 'memoryCaching', 'onlyMemoryCaching', 'memoryCachingLimit', 'cacheDir', 'caching', 'lifeTime', 'fileLocking', 'writeControl', 'readControl', 'readControlType', 'pearErrorMode');
+        // options really needed by pLog
+        $availableOptions = array('cacheDir');
         foreach($options as $key => $value) {
             if(in_array($key, $availableOptions)) {
                 $property = '_'.$key;

Modified: plog/branches/plog-1.1-ben/class/cache/cachemanager.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/cache/cachemanager.class.php	2005-04-05 22:03:34 UTC (rev 1761)
+++ plog/branches/plog-1.1-ben/class/cache/cachemanager.class.php	2005-04-05 22:07:20 UTC (rev 1762)
@@ -47,12 +47,7 @@
                 // define defaults
                 $cacheParameter = array(
                     'cacheDir' => "./tmp/",
-                    'caching'  => true,
-                    'fileLocking' => true,
-                    'writeControl' => true,
-                    'readControl' => false,
-                    'automaticSerialization' => true,
-                    'hashedDirectoryLevel' => 2 );
+                     );
 
                 // build a new cache object
                 $cache =& new Cache( $cacheParameter);




More information about the pLog-svn mailing list