config.setup_cache() is part of the cachemiddleware, but some errors occur if you only use the cache api without the middleware. Fore example when using the config object in a script or in the shell.