Forum OpenACS Q&A: Re: Issues with ns_cache emulation in Naviserver 4.99.6?

Posted by Gustaf Neumann on
Dear Michael,

OpenACS runs since a long time NaviServer, and does not see this problem.

From your wording i would assume that you are running a rather old version of acs-core (and therefore file-storage). NaviServer does not require the classical AOLserver hack for cache expiration, since NaviServer's nscache has expiration already built in [1]. Therefore there is no need to add pairs of (value, timestamp) to the cache, to fetch the value, compare the timestamp, refetch and store if necessary. This old policy is also prone to race conditions; when two cache operations happen on the same entry at the same time, confusion is likely. With NaviServer one needs just a single, atomic operation, the remainder happens in C. Therefore, the memoize-procs [2] are quite differently implemented for AOLserver and NaviServer in recent versions of OpenACS.

Also, something else comes to my mind: there were many places in OpenACS, where util_memoize was called with double quotes ("...") instead of a proper lost ([list ...]). In such cases, it was just a matter of luck, when a argument confusion happened. All these places are fixed in the oacs-5-8 branch.

all the best


Posted by Michael Steigman on
Thanks for the response, Gustaf. You're right - we're currently running 5.7. I didn't realize that you had retooled memorize in the toolkit for 5.8 as well.

We should be upgrading soon. Good to know that should take care of this.

Thanks again.