18. Built-in middleware reference

This document explains all middleware components that come with Kay. For information on how how to use them and how to write your own middleware, see the Middleware.

18.1. Available middleware

18.1.1. Cache middleware

class kay.cache.middleware.CacheMiddleware

Enable the site-wide cache. If these are enabled, each Kay-powered page will be cached for as long as the settings.CACHE_MIDDLEWARE_SECONDS setting defines. You need to place kay.auth.middleware.AuthenticationMiddleware before kay.cache.middleware.CacheMiddleware.

18.1.2. Session middleware

class kay.sessions.middleware.SessionMiddleware

Enables session support. See the Using session.

18.1.3. Authentication middleware

class kay.auth.middleware.AuthenticationMiddleware

Adds the user attribute, representing the currently-logged-in user, to every incoming Request object. See Using authentication.

Table Of Contents

Previous topic

17. Middleware

Next topic

19. Running Tests

This Page