Welcome Guest, Not a member yet? Register   Sign In
Hooks and Custom Cache Path
#1

[eluser]Unknown[/eluser]
I need to generate a dynamic path for the DB cache directory path found in the database config file that is based on a db query. The query returns a website id value so I end up with ...

Code:
$db['default']['cachedir'] = 'caches/' . $WebsiteID . '/';

At the moment I am doing a simple query directly in the database config file to set the website id variable and it works fine, but it seems like a pre system hook would be the more appropriate place to put this code. So I created a hook that performs the same function. What I don't understand is how to I make $WebsiteID available in the database config file.

Any help would be most appreciated.




Theme © iAndrew 2016 - Forum software by © MyBB