From 08c22da8e5d5a811998e43026b19b34bef95c56e Mon Sep 17 00:00:00 2001 From: Tobe O Date: Tue, 28 Nov 2017 13:07:27 -0500 Subject: [PATCH] Fixed cache bug --- .idea/runConfigurations/tests_in_route.xml | 8 ++++++++ lib/src/router.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .idea/runConfigurations/tests_in_route.xml diff --git a/.idea/runConfigurations/tests_in_route.xml b/.idea/runConfigurations/tests_in_route.xml new file mode 100644 index 00000000..826fa404 --- /dev/null +++ b/.idea/runConfigurations/tests_in_route.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/lib/src/router.dart b/lib/src/router.dart index e26ea599..81978461 100644 --- a/lib/src/router.dart +++ b/lib/src/router.dart @@ -329,7 +329,7 @@ class Router { Iterable resolveAll(String absolute, String relative, {String method: 'GET', bool strip: true}) { if (_useCache == true) { - return _cache.putIfAbsent(absolute, + return _cache.putIfAbsent('$method$absolute', () => _resolveAll(absolute, relative, method: method, strip: strip)); } diff --git a/pubspec.yaml b/pubspec.yaml index c6abb050..adaf7108 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: angel_route description: A powerful, isomorphic routing library for Dart. -version: 2.0.3+1 +version: 2.0.3+2 author: Tobe O homepage: https://github.com/angel-dart/angel_route environment: