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} {$i<50} {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.

Reply via email to