From 205d654ccadeceaeae15e2f1a6529d755a5e5d55 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Sun, 1 Apr 2018 22:02:56 -0400 Subject: [PATCH] Add cache.close to README --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b858d9d0..ac775e77 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,9 @@ Future configureServer(Angel app) async { // You can also pass an invalidation timeout. var cache = new ResponseCache(timeout: const Duration(days: 2)); + // Close the cache when the application closes. + app.shutdownHooks.add((_) => cache.close()); + // Use `patterns` to specify which resources should be cached. cache.patterns.addAll([ 'robots.txt',