I am using getCache to attempt to only refresh the information generated by a snippet every 10 or so minutes for a live timing page for a running race. I have a custom snippet which fetches around 2500 records from the live timings table, sorts, ranks and calculates pace for each runner into a table like this:
http://www.centurionrunning.com/results/2012/sdw-100-2012-race-report/results/
There's quite a lot of processing to do and usually the page take 10-15 seconds to generate. I have used getCache successfully in the past however the last two races the cache refuses to clear which means the results don't get updated. I generally have to clear the entire cache and when I do that the entire site goes down under the load of visitors (during a race weekend) as it attempts to regenerate every page on the site. This takes about 20 mins for the site to come up, all the while it gives 500 internal errors even with cloudflare CDN and CPU load shoots to 90+. It's currently running on a 4 core 6gb VPS through site5.
I do think my snippet could do with some optimisation however getCache used to work without any problem in the past, not sure what has changed. My call is
[[!getCache?
&element=`liveRunnerTime`
&cacheExpires=`600`
&startTimestamp=`2012-06-30 06:00`
&race=`Centurion Sdw100 2012`
&tpl=`LiveRaceRow15`
&raceId=`5`
]]
Any ideas why getCache wouldn't work with data intensive snippets? Is there a processing time out at all before it refuses to refresh the cache?