django.middleware.cache.UpdateCacheMiddleware
; and django.middleware.cache.FetchFromCacheMiddleware
Enable the site-wide cache. If these are enabled, each Django-powered page will be cached for as long as the CACHE_MIDDLEWARE_SECONDS
setting defines. See the cache documentation.
django.middleware.common.CommonMiddleware
Adds a few conveniences for perfectionists:
Forbids access to user agents in the
DISALLOWED_USER_AGENTS
setting, which should be a list of compiled regular expression objects.Performs URL rewriting based on the
APPEND_SLASH
andPREPEND_WWW
settings.If
APPEND_SLASH
isTrue
and the initial URL doesn't end with a slash, and it is not found in the URLconf, then a new URL is formed by appending a slash at the end. If this new URL is found in the URLconf, then Django redirects the request to this new URL. Otherwise, the initial URL is processed as usual.For example,
foo.com/bar
will be redirected tofoo.com/bar/
if you don't...