From 6a8183d6465682c2258f93293c30cb1b6976ea16 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Sun, 1 Apr 2018 21:27:56 -0400 Subject: [PATCH] Update ifModifiedSince --- lib/src/cache.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/src/cache.dart b/lib/src/cache.dart index 09f102c5..1073d361 100644 --- a/lib/src/cache.dart +++ b/lib/src/cache.dart @@ -27,9 +27,7 @@ class ResponseCache { _cache.containsKey(req.uri.path)) { var response = _cache[req.uri.path]; - // Only send a cached response if it is valid. - if (timeout == null || - modifiedSince.difference(response.timestamp) >= timeout) { + if (response.timestamp.compareTo(modifiedSince) <= 0) { res.statusCode = 304; return false; }