Create cache factory