Added close method to CachingMiddleware.
Merge pull request #39 from fokinpv/fix-caching-json-close

Added close method to CachingMiddleware.