[ic] [timed-build] not working for logged in users

Jon Jensen jon at endpoint.com
Tue Jul 11 20:54:12 EDT 2006


On Tue, 11 Jul 2006, Peter wrote:

>> If you consider timed builds a necessity, including for logged-in users 
>> (as I do for many sites) then you need to generate links on the fly so 
>> that they can contain session IDs if necessary. We do this on a few 
>> sites by having a wrapper around timed-build:
>
> This is unnecessary overhead for people who have a session cookie, 
> though, overhead that [timed-build] is designed to minimise.  It would 
> be better to only do this for people who don't pass a session cookie.
>
> [timed-build] as it is currently is designed to abort (not use the 
> cache) for people without a session cookie if login=1 is passed (or if 
> it isn't passed, but we're discussing using login=1 or auto=1 instead of 
> force=1).  Since a very small number of users don't have cookies it is 
> not a big deal (imo) to have the extra overhead of aborting 
> [timed-build] for those users, also since this is the documented and 
> coded functionality it's best (imo) to just leave it and fix the bugs in 
> it rather than to try to add more functionality to make up for it.

Your use case is not the same as mine, apparently. The cost to do even a 
single database query is vastly greater than the cost to interpolate some 
[area] tags. The cost to do a complex database query can be much, much 
higher, so saving that for even the relatively few logged-in users without 
cookies can be well worth the tiny cost.

> The bug in this case (I haven't fully tested it so I can't say for sure) 
> is that $Vend::Cookie is not being set (or is being unset) for logged in 
> users somewhere, so the test for $Vend::Cookie is failing and the 
> [timed-build] is aborting when login=1 is passed.

UserDB clears $Vend::Cookie at login time. I don't know why.

Jon

-- 
Jon Jensen
End Point Corporation
http://www.endpoint.com/


More information about the interchange-users mailing list