Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-05-11 Thread Wojciech Kocjan
Xavier Beaudouin napisa(a):
This is exactly what I was looking for... I just need to adapt it for
LDAP and SQL... and add a callback to auto garbage collector old
database
stuff to get a TTL for cached hosts :)
Well why don't you just change the cache type to timing out, just switch
from Ns_CacheCreateSz() to Ns_CacheCreate() and it should work.
--
WK
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


[AOLSERVER] Cache timeout handling in 3.x

2005-05-11 Thread Wojciech Kocjan
Hello,
I've noticed that in 3.4.2 (the code is quite different in 4.0, so it's
hard to say how it handles that), the cache mechanism tends to update
expiration date when I call Ns_CacheCreateEntry on an existing entry.
I wanted to have a cache that expires after at most 15 minutes, because
I have data that can be changed from time to time, but is constantly
requested by most webpages.
After doing some testing it seemed to me that fetching the data (doing
[ns_cache eval]) made the expiration date refresh and I wasn't able to
do the following:
catch {ns_cache create x -timeout 1}; set j 0;
for {set i 0} {$i50} {incr i} {ns_cache eval x a {incr j}; after 700};
set j
j was always '1', instead of about 20-30.
--
WK
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-05-11 Thread Xavier Beaudouin
This is exactly what I was looking for... I just need to adapt it for
LDAP and SQL... and add a callback to auto garbage collector old
database
stuff to get a TTL for cached hosts :)
Well why don't you just change the cache type to timing out, just
switch
from Ns_CacheCreateSz() to Ns_CacheCreate() and it should work.
Thanks for the advice... :) Now I just need to code the ldap part :)
/Xavier
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-05-11 Thread Wojciech Kocjan
Xavier Beaudouin napisa(a):
Well why don't you just change the cache type to timing out, just
switch
from Ns_CacheCreateSz() to Ns_CacheCreate() and it should work.
Thanks for the advice... :) Now I just need to code the ldap part :)
How did googling 'tcl ldap' end up? I remember there is an LDAP
interface, but not sure about one for AOLserver.
--
WK
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.