[Templates] A problem with document caching?

[prev] [thread] [next] [Date index for 2004/09/19]

From: Tosh Cooey
Subject: [Templates] A problem with document caching?
Date: 21:10 on 19 Sep 2004
I knew that this was messy and that some day I'd have to ask for help trying to 
dig myself out of this mess... so...

I have a "framework" running under ModPerl::Registry and one of the scripts is 
giving me some trouble.

The "framework" has a global variable called $globals{templateOBJ} which is a 
new Template({ABSOLUTE => 1}) TT2 object.

The script in question creates a new Template object, not using the one already 
existing because I use two different kinds of TAG style, so things look like this:

1) Create new Template object with START_TAG and END_TAG arguments.
2) Do stuff.
3) Check to see if there exists a TT2 file in my own "cache" (/tmp/cache) that I 
can use based on the CGI arguments, example:
www.site.com/view.pl?product=xyz causes a file /tmp/cache/product=xyz.htm to be 
searched for, if it doesn't exist then it's created.
4) The creation process is accomplished with a new Template {ABSOLUTE => 1, 
OUTPUT => $filename} and the result is saved to disk for "caching"

So product info is cached because it doesn't change, and user information is 
processed using the [* *] tags.

This all works fine under a normal Apache CGI environment, but once the script 
is running under ModPerl::Registry, or even ModPerl::PerlRun I am not getting 
the correct files served.

For example, www.site.com/view.pl?product=xyz might actually show me the result 
of www.site.com/view.pl?category=foo.

My httpd.conf has a "PerlModule CGI" perhaps that's causing some problem with 
the input arguments?  Or have I missed some important mailing list post about 
how to "process" two Template objects in one CGI call?

Anything from help to suggestions to directions in the FM to RTFM would be 
greatly welcomed!!!

Thanks all!

Tosh

        -- 
        McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/


_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] A problem with document caching?
Tosh Cooey 21:10 on 19 Sep 2004

Re: [Templates] A problem with document caching?
Buddy Burden 17:16 on 20 Sep 2004

Re: [Templates] A problem with document caching?
Perrin Harkins 19:38 on 20 Sep 2004

Re: [Templates] A problem with document caching?
Perrin Harkins 00:00 on 21 Sep 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52