Added support for namespaces in cache factory