File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1+ ## v2.0.4
2+ * Reconnect when a redis command fails.
3+
14## v2.0.3
25 * Added ` topics ` to ` pubspec.yaml ` .
36
Original file line number Diff line number Diff line change @@ -131,7 +131,12 @@ class RedisCacheProvider extends CacheProvider<List<int>> {
131131 try {
132132 return await fn (ctx.client).timeout (_commandTimeLimit);
133133 } on RedisCommandException catch (e) {
134- throw AssertionError ('error from redis command: $e ' );
134+ // We don't really know what happened, let's log shout it.
135+ // It could be a sign that something really bad is happening to redis.
136+ // Best shutdown the connection and try again.
137+ _log.shout ('Error from redis command: $e ' );
138+ await ctx.client.close (force: true );
139+ throw IntermittentCacheException ('error from redis command: $e ' );
135140 } on TimeoutException {
136141 // If we had a timeout, doing the command we forcibly disconnect
137142 // from the server, such that next retry will use a new connection.
Original file line number Diff line number Diff line change 11name : neat_cache
2- version : 2.0.3
2+ version : 2.0.4
33description : >-
44 A neat cache abstraction for wrapping in-memory or redis caches.
55homepage : https://github.com/google/dart-neats/tree/master/neat_cache
You can’t perform that action at this time.
0 commit comments