Forum OpenACS Q&A: Re: cachingmode=none creates a log of ns_log notice entries in error.log

Dear Marty,

"ns_cache_eval" works as follows:
1) create a temporary cache entry for the key
2) lock the cache-key (to avoid multiple parallel executions)
3) execute the query
4) store the result for the entry on success
5) unlock the cache-key

In nocache mode, it simply skips (4). The cache collision message means that while executing "ns_cache eval SOMECACHE SOMEKEY", a second call for the same cache and key was issued. In normal caching modes, this is desired to avoid computing the same (expensive) call multiple times in parallel. The later call(s) wait for the result of the first execution and return this.

In nocache mode, there is no cached result, and therefore, steps 1..5 can be skipped. I have just now added such a change to NaviServer on Bitbucket, such that multiple queries with the same key can be executed in parallel, without call serialization.

All the best

Thanks for adding this. I will bring down the latest to test it out when I get a free moment.