1 (edited by Smartys 2005-06-14 18:38)

Topic: extern.php and cache

from extern.php

// Get the forum config
$result = $db->query('SELECT * FROM '.$db->prefix.'config') or error('Unable to fetch forum config', __FILE__, __LINE__, $db->error());
while ($cur_config_item = $db->fetch_row($result))
    $pun_config[$cur_config_item[0]] = $cur_config_item[1];

Wouldn't it save a query in most cases to do what common.php does

// Load cached config
@include PUN_ROOT.'cache/cache_config.php';
if (!defined('PUN_CONFIG_LOADED'))
    require PUN_ROOT.'include/cache.php';
    require PUN_ROOT.'cache/cache_config.php';

Re: extern.php and cache

Good tip! This should have been included in the original version smile

Re: extern.php and cache

I believe you're absolutely right. I'll put it on the list smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."