dart-lang / pub-dev

The pub.dev website
https://pub.dev
BSD 3-Clause "New" or "Revised" License
774 stars 145 forks source link

Remove wrapper around redis CacheProvider #4978

Open jonasfj opened 3 years ago

jonasfj commented 3 years ago

We get unimportant exceptions from here: https://github.com/dart-lang/pub-dev/blob/master/app/lib/shared/redis_cache.dart#L351

Lets' add an option to RedisCacheProvider that enables users to configure a connection cycling interval. Probably setup in: https://github.com/google/dart-neats/blob/03f1b98dc5c8384862e1d9809d5fd7e71e9598b6/neat_cache/lib/src/providers/redis.dart#L100-L122

This avoid us having a special wrapper in pub-dev :D

jonasfj commented 3 years ago

I think this is also the source of:

rediscache: Failed to update redis connection.

Error:
    redis command timeout

Stack:
    #0      RedisCacheProvider._withResp (package:neat_cache/src/providers/redis.dart:139:7)
    <asynchronous suspension>
    #1      new _ConnectionRefreshingCacheProvider._.<anonymous closure> (package:pub_dev/shared/redis_cache.dart:339:9)
    <asynchronous suspension>
isoos commented 8 months ago

We could also check if this new redis client would be better for our use case: https://pub.dev/packages/ioredis