The version of ns_cache you are using doeen't support the parameter xowiki is using, specifically "pattern". In previous versions of ns_cache, "ns_cache names" only took one parameter. The latest version has a second optional parameter.
AFAICT you need to acutally get ns_cache from CVS to get this version of the code. You can also change the code to this:
lsearch [ns_cache names xowiki_cache] link-*-$folder_id
instead of
ns_cache names xowiki_cache link-*-$folder_id