Fixed cache bug

This commit is contained in:
Tobe O 2017-11-28 13:07:27 -05:00
parent ea175d49f9
commit 08c22da8e5
3 changed files with 10 additions and 2 deletions

View file

@ -0,0 +1,8 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="tests in route" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
<option name="filePath" value="$PROJECT_DIR$" />
<option name="scope" value="FOLDER" />
<option name="testRunnerOptions" value="-j 4" />
<method />
</configuration>
</component>

View file

@ -329,7 +329,7 @@ class Router {
Iterable<RoutingResult> 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));
}

View file

@ -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 <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_route
environment: