If you want the entire domain scope to expire after 5 minutes, you just need
to change the variableTimeout.
<@ASSIGN domain$variableTimeout 5>
Again, the 5 minute counter starts from the last "access" to the scope. A
cacheing strategy might be more appropriate:
<@IF " @@domain$cacheTime = '' OR
<@CALC ' ( <@TSTOSECS <@CURRENTTIMESTAMP>> - @@domain$cacheTime ) > 20
'>
"> <@! "20 seconds">
<@ASSIGN domain$cacheTime <@TSTOSECS <@CURRENTTIMESTAMP>>>
<@PURGE domain$foo>
<@ELSE>
Cache is good: <@SECSTOTS @@domain$cacheTime><br>
</@IF>
<@IFEMPTY @@domain$foo> <@! "or use an if action">
The variable has expired.<br>
<@ASSIGN domain$foo whatever>
</@IF>
domain$foo: @@domain$foo<br>
-----Original Message-----
From: WebDude [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 11:14 AM
To: [email protected]
Subject: RE: Witango-Talk: Expiring a domain scope variable
Do I need to make this a custom scope in order to expire the variable?
By the way, I am using Witango 2000...
John Muldoon
Corporate Incentives
3416 Nicollet Ave S
Minneapolis, MN 55408-4552
612.822.2222
[EMAIL PROTECTED]
http://cipromo.com
-----Original Message-----
From: Jesse Parker [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 9:48 AM
To: [email protected]
Subject: RE: Witango-Talk: Expiring a domain scope variable
A quick check shows that "custom scopes" are still functioning in 5.5.
You can use a custom scope to store information with a constant
REFERENCEKEY. The scope behaves like any other scope. Keep in mind that
the variables will only expire after a period of inactivity (the scope is
not assigned to or referenced for > variableTimeout minutes.)
Currently: <@CURRENTTIMESTAMP><br>
<@IFEMPTY <@VAR myScope$foo>>
<b>myScope had expired.</b><br>
Assigning with timeout of 1 minute.<br>
<@ASSIGN myScope$foo bar>
<@ASSIGN myScope$variableTimeout 1>
Reload after <@SECSTOTS <@CALC "<@TSTOSECS
<@CURRENTTIMESTAMP>>+60">> <@ELSE>
<b>myScope not empty.</b><br>
Since we referenced the scope in the @IFEMPTY, the countdown has
been reset.<br>
Reload after <@SECSTOTS <@CALC "<@TSTOSECS
<@CURRENTTIMESTAMP>>+60">> </@IF>
-----Original Message-----
From: WebDude [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 10:23 AM
To: [email protected]
Subject: Witango-Talk: Expiring a domain scope variable
Is there an easy way to expire a domain scope variable, let's say, after 5
minutes?
Thanks!
WebDude
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf