Mike wrote:
Yes, I am currently using the HTML::Template filecache option, but that
doesn't seem to cache the output from runmode 2 for whatever reason?  Maybe
it does cache that output, but when I return from runmode 3 to runmode2, it
pretty much executes the whole sub, which accesses the DB to get values to
fill the template variables (in a template loop).

I think you aren't completely clear as to what the cache on H::T does. It doesn't cache the output (since that could change dramatically based on the params) it caches the parsed template so that the next time it won't have to parse it again.

Another problem with using the js back() approach would be the same
drawback with storing it in a session... The user would not see anything
that was added since the first time they did the search. The only
difference between using the javascript and the session is who does the
cacheing - the browser or the server. Either way you run into data
conherency issues.

Michael Peters
Developer
PlusThree

   I would suggest reading the docs on HTML::Template's caching
methods.  They may help, but HTML::Template is quite fast anyway.
-spencer


Mike wrote:

Hello,

I have a database application which is very similar in structure to the

one given in the C::A example:

run mode 1: search form
run mode 2: access (MySQL) database and display results
run mode 3: detailed information on one item

Each run mode outputs to the browser using HTML::Template. The

application works fine, although I am concerned that when I return to run mode 2 from run mode 3, it has to search through the database again before displaying the same results.

Is there a way to get from rm 3 (via a link) back to the _template

output_ of rm 2 without having to go through the whole rm 2 script (which opens a DB connection, performs a select statement etc. then plugs the relevant template variables into the template file, and finally outputs the template to the browser)? I know it can be done with javascript:history.back(), but what can be done for non-js browsers or browsers with js turned off? Am I missing something that should be staring me in the face?

Any help/suggestions would be greatly appreciated.

Mike.

--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to