Add middleware classes for caching