Welcome Guest, Not a member yet? Register   Sign In
Database Cache - automatically "ping" pages on database update to create new cache files?
#3

[eluser]tinawina[/eluser]
I know I'm hogging up bandwidth with this problem of mine - sorry! Just in a bit of a hurry to solve this.

Does anyone see anything wrong with running a script that loops through all pages that need a database cache -- 41 total (that won't change as it's the taxonomy we use for all publications) using PHP's "system" function to create my cache files?
Code:
$array = ('this', 'that', 'other');
foreach ($array as $value)
{
   system("GET http://mysite.org/publications/profile/" . $value);
}
This pulls up the exact same page a visitor would pull up and create the cache file I need to have in place so that visitors don't have incredibly long load times if they are first to pull up a page. I tried this and it took awhile to complete, but in the end did create the cache files.

So when we approve a publication I would run a $this->db->cache_delete_all(), and then run a script that does this loop through. What do you think?


Messages In This Thread
Database Cache - automatically "ping" pages on database update to create new cache files? - by El Forum - 09-17-2012, 04:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB