[ic] Timed build and sessions

Mike Heins mike at perusion.com
Tue Aug 26 00:45:08 EDT 2003

Quoting Jamie Neil (jamie at versado.net):
> Hi all,
> I've got a problem that I'm trying to use timed-build to solve, but I'm 
> getting stuck on session id's.
> I have two different components that each show a small selection of 
> products randomly selected from a subset of the database: "Featured 
> Products" uses the merchandising table and "Special Offers" uses a 
> sale_price field in the pricing table (see http://www.clickgolf.co.uk/).
> These work fine, however I want to modify them so that on any given day 
> they display the same products on the same page instead of presenting a 
> new set each time the page is refreshed. The idea is to make the pages 
> more "stable".
> I thought timed-build sounded perfect for this, so I tried this:
> [timed-build period="1440" file=|timed/promo-[control banner Featured 
> Products]-[control matches 3]-[control promo_type featured]-[value deptid]|]
> ...component code...
> [/timed-build]
> (The reason for the complex filename is that the components are called 
> on several different pages with different arguments for display and 
> filtering.)
> This seems to work fine, except when a user is logged in, so I tried 
> adding "login=1". Unfortunately this didn't help because the id and 
> mv_pc values are embedded into the URL when users log in on my site. 

Also, I think [timed-build ...] should probably never use session
IDs for the links and will check on the core list about adding
code to do something about that.

To test out what it would be you might try this patch to Interpolate.pm:

--- /r/Interpolate.pm	2003-08-10 13:17:44.000000000 -0400
+++ /rt/Interpolate.pm	2003-08-25 23:43:33.000000000 -0400
@@ -5253,6 +5253,9 @@
+	local ($::Scratch->{mv_no_session_id});
+	$::Scratch->{mv_no_session_id} = 1;
 	if($opt->{auto}) {
 		$opt->{login} =    1 unless defined $opt->{login};
 		$opt->{minutes} = 60 unless defined $opt->{minutes};

Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike at perusion.com>

I don't want to get to the end of my life and find I have just
lived the length of it. I want to have lived the width of it as
well. -- Diane Ackerman

More information about the interchange-users mailing list