Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
What does the Xanthia 'Generate Config Cache' link do?
  • Posted: 25.06.2005, 20:24
     
    craigh
    rank:
    Professional Professional
    registered:
     June 2003
    Status:
    offline
    last visit:
    27.08.08
    Posts:
    1147
    What does the 'Generate Config Cache' link do?

    It runs four Xanthia AdminAPI functions:
    1) writesettingscache (also run in the updateConfig function)
    2) writezonescache (also run in the blockControlRule, and other block control functions)
    3) writepalettescache (also run in the updateColors & setPalette functions)
    4) writethemetplcache (also run in the modifyZones and other zone control and block control functions)

    None of these functions write anything to the database. The result of each function is listed below. How the results are used is yet to be determined, but I suspect that it is useful only if Xanthia's 'enable caching' feature is checked.

    #1 writes a file to the pnTemp/Xanthia_Config/ directory called [themeName].settings.php. It contains information similar to the following:

    Code

    <?php
        $this->config['righton'] = '0';
        $this->config['indexcol'] = '1';
        $this->config['rcolwidth'] = '175';
        $this->config['lcolwidth'] = '160';
        $this->config['pagewidth'] = '100%';
       
        ?>


    #2 writes several files to the pnTemp/Xanthia_Config/ directory called [themeName].[moduleName].config.php. There is one file in the directory for each module installed in your site. Each file seems to be identical and each only contains "", so the function of these cache files is unknown. I suspect that these may be useful in Xanthia's Block Control mechanism, but don't use that feature..

    #3 writes a file to the pnTemp/Xanthia_Config/ directory called [themeName].palettes.php. It contains information similar to the following:

    Code

    <?php
        $colors = array('palette_name' =>  'greys',
        'background'  =>  '#FFFFFF',
        'color1'      =>  '#cccccc',
        'color2'      =>  '#000000',
        'color3'      =>  '#eeeeee',
        'color4'      =>  '#000000',
        'color5'      =>  '#000000',
        'color6'      =>  '#cccccc',
        'color7'      =>  '#cccccc',
        'color8'      =>  '#cccccc',
        'sepcolor'    =>  '#FFFFFF',
        'text1'       =>  '#666666',
        'text2'       =>  '#000000',
        'link'        =>  '#333333',
        'vlink'       =>  '#333333',
        'hover'       =>  '#333333');
       
       
        ?>


    #4 writes several files to the pnTemp/Xanthia_Confirg/ directory called [themeName].[moduleName].tplconfig.php. There is one file in the directory for each module installed in your site. I suspect that these may be useful in Xanthia's Block Control and Zone control mechanism, but don't use that feature. These files all seem to be identical and each contains information similar to the collowing:

    Code

    <?php
        $themezones = array (
        '0' => array (
        'label' => '*home',
        'active' => '1',
        'type' => 'module'),
       
        '1' => array (
        'label' => 'ccblock',
        'active' => '1',
        'type' => 'block'),
       
        ...[continues]...
       
        '8' => array (
        'label' => 'master',
        'active' => '1',
        'type' => 'theme')
        );
       
       
        $zonetemplates = array (
        '*home' => 'home.htm',
        'ccblock' => 'ccblock.htm',
        'News-article' => 'News-article.htm',
        'News-index' => 'News-index.htm',
        'table2' => 'table2.htm',
        'table1' => 'table1.htm',
        'rsblock' => 'rsblock.htm',
        'lsblock' => 'lsblock.htm',
        'master' => 'master.htm');
       
       
        $blocktemplates = " ";
        ?>


    IF ANYONE ELSE HAS MORE INSIGHT ON THIS TOPIC, PLEASE ADD TO THIS THREAD!
  • Posted: 25.06.2005, 22:19
     
    Simon
    rank:
    Steering Committee Steering Committee
    registered:
     December 2002
    Status:
    offline
    last visit:
    09.11.08
    Posts:
    13413
    Clarification on #2, since I use Block Control:

    This caches every one of your block positions. When rendering blocks, Xanthia first checks whether a module is using BC. If it is, Xanthia checks for the cache file, if that exists, no database query is executed to get the blocks for each position, and the information is loaded out of the file. If there isn't, a DB query is executed.

    This cache is updated whenever you change your block control settings.

    --
    Regards,
    Simon

    itbegins.co.uk - Zikula Consulting

    Please read the Support Guide
  • Posted: 25.06.2005, 23:10
     
    craigh
    rank:
    Professional Professional
    registered:
     June 2003
    Status:
    offline
    last visit:
    27.08.08
    Posts:
    1147

    craigh

    I suspect that it is useful only if Xanthia's 'enable caching' feature is checked.
    This is rather an important question, actually. Does anyone know the answer?
  • Posted: 26.06.2005, 01:19
     
    Simon
    rank:
    Steering Committee Steering Committee
    registered:
     December 2002
    Status:
    offline
    last visit:
    09.11.08
    Posts:
    13413
    I'm fairly sure the configuration cache is always used, regardless of whether caching is enabled (though it's a while since I've looked at the code)

    --
    Regards,
    Simon

    itbegins.co.uk - Zikula Consulting

    Please read the Support Guide

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula