Topic: Strange issue using forum globals in included file.

In an extension I am working on, I have the following in manifest.xml:

<hook id="hd_head">
            <![CDATA[
                if ( FORUM_PAGE == 'index' )
                {
                    require_once $ext_info['path'].'/include/functions.php';
                    checkForUpdate();
                }
            ]]>
</hook>

At the very top of the functions.php file, I have the following:

    global $forum_config;
    echo '<div style="display:none;">';
    print_r($forum_config);
    echo '</div>';

When I view the output of the print_r statement, the values in the array are always the values of the config table at the time the extension was installed. That is to say, if I change a value in the config table (from the ACP or directly through phpMyAdmin), the values of $forum_config in functions.php do not change until I reinstall the extension.

If I use $forum_config in the actual manifest.xml though, it works fine.

Any idea why this is?

Re: Strange issue using forum globals in included file.

Check cache/cache_hooks.php - maybe $forum_config is cached.

Re: Strange issue using forum globals in included file.

I don't think it's cache_hooks.php, but there is a cache_config.php that contains the $forum_config array and deleting it solves the problem.

Will I have to delete the cache_config.php in my extension, or is there another way to bypass using the cached values? I could just query the DB in the extension and store the config table in my own array, but I was trying to avoid using another query if I didn't have to.