I have a resource that calls a snippet. The snippet checks to see if a cache file exists for the given parameters (in the query string), and if it does not exist, the creation of the page begins and the cache file is written. My problem is that the parameters from the query string cause there to be 93 variants of the page. I’m working on a way to reduce the load time (currently about 1.5 minutes per variant, which is why I use cache). Since I need to rebuild the cache after every update (to have the latest version), building the cache by viewing each page in a new browser tab is resource intensive and slow.
I tried rebuilding the cache using wget, but the content (generated by the snippet) is empty. I tried using cURL, but I got a 302 response with the home page. I tried iframes, and they displayed the home page, and did not build the cache. I tried using AJAX with jQuery, but that didn’t even load one page. I’m really running out of options for how to call pages from PHP or shell to build the cache files.
What ideas do you have for me to build each individual cache file based on the query string?
MODx Revolution 2.0.8-pl (traditional)
Red Hat Enterprise Linux Server release 5.5 (Tikanga) (CentOS)
PHP Version 5.2.16
[Edited by mts7 at 2011-04-06 21:51 to include descriptions of other tests performed]
[Edited by mts7 at 2011-04-06 22:06 to update descriptions of other tests performed]