cache factory.