Fix issue #9907, add cache for the GetNamespaceFilter call
