Welcome Guest, Not a member yet? Register   Sign In
Database Caching - turning on/off with if/else isn't working
#3

[eluser]tinawina[/eluser]
Database cache is working -- I'm getting a ton of cache files. But what I want to get is database cache files only for pages viewed from a certain controller. For example, here are three URLs:
Code:
http://mysite.org/publications
http://mysite.org/authors
http://mysite.org/topics
What we want are cache files for topics only. So when someone clicks on http://mysite.org/topics/education, a cache file is created just for that topic. At this point our cache folder should have only one sub-folder, "topics+education". When someone clicks on http://mysite.org/topics/employment_and_labor a second file, "topics+employment_and_labor", is generated. But when they click on http://mysite.org/authors/terry_cloth there should be no database cache file created. Right now, "authors+terry_cloth" is generated.

The way that our site is set up, all queries funnel through one library that generates the query we need according to the controller and subsequent segments in the URL. That's why I'm able to discern in my code which query needs to run. According to the user guide you can turn database caching on or off as needed on a query by query basis. That's why I set up the if/else to work as described in my original post. Theoretically it seems it should work, it just doesn't.

Thanks for your help!


Messages In This Thread
Database Caching - turning on/off with if/else isn't working - by El Forum - 09-19-2012, 05:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB