Database Caching - turning on/off with if/else isn't working |
[eluser]tinawina[/eluser]
I posted this yesterday within a thread I started titled "Database Cache - automatically "ping" pages on database update to create new cache files?" (http://ellislab.com/forums/viewthread/224464). I'm reposting as a separate thread because this is really a different problem than the one I originally wanted help with. Here's the problem. Our queries are generated dynamically according to the URL string. We only want to cache a particular query. I can determine that query using one variable in my script. I am trying to set up an if/else that says: if this query is for X pages turn on caching, otherwise do not cache. Here's what I've got but it doesn't work (I am using $this->CI because this is all happening in a library file using CI v.2.1.2): Code: function fetch_results($query, $field = '') // $field comes from the URL, eg., http://mysite.org/field/X Code: function fetch_results($query, $field = '') Any help/insight is greatly appreciated! |
Messages In This Thread |
Database Caching - turning on/off with if/else isn't working - by El Forum - 09-18-2012, 05:25 AM
Database Caching - turning on/off with if/else isn't working - by El Forum - 09-18-2012, 07:44 PM
Database Caching - turning on/off with if/else isn't working - by El Forum - 09-19-2012, 05:40 AM
|