Changeset 2487

Show
Ignore:
Timestamp:
09/14/06 06:21:26
Author:
demian
Message:

Added config GUI switch for enabling the library cache

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.6-bugfix/CHANGELOG.txt

    r2486 r2487  
    2828 
    2929IMPROVEMENTS 
     3014-09-06    Added config GUI switch for enabling the library cache 
    303111-09-06    Added ability to disable blocks on a per-page basis, simply have the 
    3132            block's init() method return false conditionally 
  • branches/0.6-bugfix/etc/default.conf.dist.ini

    r2486 r2487  
    6161; enable file caching of navigation and blocks 
    6262enabled                 = false 
     63libCacheEnabled         = false 
    6364lifetime                = 86400 ; 24 hrs in secs 
    6465 
  • branches/0.6-bugfix/modules/default/classes/ConfigMgr.php

    r2486 r2487  
    9292            3 => 'word fragment', 
    9393            ); 
    94         $this->aDbDoDebugLevels = array( 
    95             0 => 0, 
    96             1 => 1, 
    97             2 => 2, 
    98             3 => 3, 
    99             4 => 4, 
    100             5 => 5, 
    101             ); 
     94        $this->aDbDoDebugLevels = range(0, 5); 
    10295 
    10396        //  any files where the last 3 letters are 'Nav' in the modules/navigation/classes will be returned 
     
    258251            return false; 
    259252        } 
     253        //  lib cache is enabled by setting file flag in seagull/var 
     254        $cacheFileFlag = SGL_VAR_DIR . '/ENABLE_LIBCACHE.txt'; 
     255        $cachedLibsFile = SGL_VAR_DIR . '/cachedLibs.php'; 
     256        if ($input->conf['cache']['libCacheEnabled']) { 
     257            if (!is_file($cacheFileFlag)) { 
     258                $ok = touch($cacheFileFlag); 
     259            } 
     260        } else { 
     261            if (is_file($cacheFileFlag)) { 
     262                $ok = unlink($cacheFileFlag); 
     263            } 
     264            if (is_file($cachedLibsFile)) { 
     265                $ok = unlink($cachedLibsFile); 
     266            } 
     267        } 
    260268        //  add version info which is not available in form 
    261269        $c = &SGL_Config::singleton(); 
  • branches/0.6-bugfix/modules/default/lang/english-iso-8859-15.php

    r2486 r2487  
    244244        'Mark words which were not translated' => 'Mark words which were not translated', 
    245245        'Caching Options'=>'Caching Options', 
    246         'Enable caching'=>'Enable caching', 
     246        'Enable global caching'=>'Enable global caching', 
     247        'Enable library caching' => 'Enable library caching', 
    247248        'Cache lifetime (secs)'=>'Cache lifetime (secs)', 
    248249        'Database Options'=>'Database Options', 
  • branches/0.6-bugfix/modules/default/templates/admin_configEdit.html

    r2486 r2487  
    345345            <h3>{translate(#Caching#)}</h3> 
    346346            <p> 
    347                 <label class="tipOwner" for="conf[cache][enabled]">{translate(#Enable caching#)} 
     347                <label class="tipOwner" for="conf[cache][enabled]">{translate(#Enable global caching#)} 
    348348                <span class="tipText">{translate(#It is recommended to disable this while developing#)}</span> 
    349349                </label> 
     
    355355                </label> 
    356356                <input type="text" name="conf[cache][lifetime]" id="conf[cache][lifetime]" value="{conf[cache][lifetime]}" /> 
     357            </p> 
     358            <p> 
     359                <label class="tipOwner" for="conf[cache][libCacheEnabled]">{translate(#Enable library caching#)} 
     360                <span class="tipText">{translate(#It is recommended to disable this while developing#)}</span> 
     361                </label> 
     362                {generateRadioPair(#conf[cache][libCacheEnabled]#,conf[cache][libCacheEnabled]):h} 
    357363            </p> 
    358364        </fieldset>