Drop the distributed lock for FMN's redis caching

By default, locks in redis never expire. This can lead to a deadlock if
a worker dies unexpectedly while trying to create a cache entry, which
leaves the lock in redis for the rest of time. When a worker attempts to
refresh the cache later, it'll wait on the lock permanently. We could
set the "lock_timeout" key in the dogpile.cache configuration, but
realistically we don't need to lock at all. Populating the cache is a
single GET request and we only have a couple workers so if they happen
to try the same entry at the same time, we'll just have 4-5 requests
instead of 1.
This commit is contained in:
Jeremy Cline 2018-05-11 19:36:25 +00:00
parent 28790ecebe
commit e41fd13b9a

View file

@ -92,7 +92,6 @@ config = {
"port": 6379,
"db": 0,
"redis_expiration_time": 60*60*24, # 1 day
"distributed_lock": True
},
},