This is a module type way of loading your cache rather than editing a file. In this example our component key will be news. So paste the below contents into a file and call it news.php and save it to the sources/components_init/ folder.
There is no need to change the class name, but the cache array your calling should reflect how you have named your cache. It's best to keep your component key in this example news the same.
<?php
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class component_init
{
var $ipsclass;
function run_init()
{
$this->ipsclass->cache_array[] = 'news';
}
}
?>
There is no need to change the class name, but the cache array your calling should reflect how you have named your cache. It's best to keep your component key in this example news the same.











