• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Config autoloading skipped when using cache

#1
[eluser]Jumper[/eluser]
When CI displays a cached page, it loads the config.php but none of the application's auto loaded configuration files.

This pose a problem if there are things need to be done before the cache display(using hooks or whatever) that depend on auto loaded configuration files

#2
[eluser]coolfactor[/eluser]
That would add unnecessary overhead for most people. There's only one hook prior to the caching mechanism (pre_system), so there's nothing else loaded that libraries and modesl can be pre-loaded against. They need to be assigned to the controller instance. How do you see this being solved?

I would suggest your pre-system logic not depend on autoloaded resources. You can always access the autoload.php file directly, if you need.

#3
[eluser]Jumper[/eluser]
My specific problem is that I set (for various reasons) the $config["site_url"] inside a separate auto-loaded config file.
And since it is not loaded automatically, the cache get broken, because it depends on correct $config['site_url'] .

I temporarily solved this by modifying Codeingiter.php to autoload needed config files before using the cache, but I hope to get a more standard solution


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.