On Thu, 23 Sep 2004 22:39:06 +0100, Graham Cossey <[EMAIL PROTECTED]> wrote: > > Brad: When you say "a hash of the query string" do you mean passing the > variable part of the URL thru mhash to obtain a hash/key/digest or whatever > you wish to call it? If so, do you recommend any particular hash, ie MD5, > GOST or TIGER? Not knowing much about these things, I imagine passing the > same text thru a given hash algorithm multiple times will always return the > same result.
I tend to use md5, but the other hash functions ought to work too. I don't know about GOST and TIGER, but I know php has support for SHA1 and another that I don't remember at the moment. > So: > > Requested URL > http://server/app/page1.php?cust=12345&t=3 > > Variable part hashed > page1.php?cust=12345&t=3 > hash > mdg4789gnvh095n > > If the following URL exists use it, otherwise do processing, get buffer and > write to this file. > http://server/app/static/mdg4789gnvh095n.html Yep. I would check for the file (or whatever mechanism you use to store the cache) instead of the URL. You could write a class or a few functions that could do this check for you based on the hash. > If PDF of page requested: > Send the current URL (http://server/app/static/mdg4789gnvh095n.html) through > pdf-o-matic or similar. You might consider creating the pdf version at the same time you create the html. I depends on how your app works. Can you request a pdf before you reque > Is that about right? Yep. I think you've got it. > Many thanks No problem =) - Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php