Skip to content

In the case the fetch Method throws the CacheControlPolicy Fails #12

@stefanpieck

Description

@stefanpieck

In the case the fetch Method throws, which seems the only way to implement a statusCode check, the CacheControlPolicy throws in cleanup.

Tried calling: >(1578663515)
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1      CacheControlPolicy.cleanup.<anonymous closure> (package:flutter_cache_store/src/policies/cache_control_policy.dart:45:30)
#2      WhereIterator.moveNext (dart:_internal/iterable.dart:442:11)
#3      new List.from (dart:core-patch/array_patch.dart:47:19)
#4      Iterable.toList (dart:core/iterable.dart:400:5)
#5      CacheControlPolicy.cleanup (package:flutter_cache_store/src/policies/cache_control_policy.dart:48:8)
#6      CacheStore._cleanup.<anonymous closure> (package:flutter_cache_store/src/cache_store.dart:206:49)
#7      BasicLock.synchronized (package:synchronized/src/basic_lock.dart:32:26)
#8      CacheStore._cleanup (package:flutter_cache_store/src/cache_store.dart:199:41)
#9      CacheStore._delayCleanUp.<anonymous closure> (package:flutter_cache_store/src/cache_store.dart:225:13)
#10     new Future.delayed.<anonymous closure> (dart:async/future.dart:316:39)
#11     _rootRun (dart:async/zone.dart:1122:38)

That seems to be the case because the timestamp in the cache item is not set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions