mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
optimization: redisindexsource scan_keys: use cached key list, if available
bump requirements to gevent 1.2.2
This commit is contained in:
parent
1360723f95
commit
8fea623c52
@ -292,8 +292,12 @@ class RedisIndexSource(BaseIndexSource):
|
||||
|
||||
key = res_template(member_key, params)
|
||||
|
||||
scan_key = 'scan:' + key
|
||||
# check if already have keys to avoid extra smembers call
|
||||
keys = params.get(scan_key)
|
||||
if not keys:
|
||||
keys = self.redis.smembers(key)
|
||||
params['scan:' + key] = keys
|
||||
params[scan_key] = keys
|
||||
|
||||
match_templ = match_templ.encode('utf-8')
|
||||
|
||||
|
@ -9,6 +9,6 @@ brotlipy
|
||||
pyyaml
|
||||
werkzeug
|
||||
webencodings
|
||||
gevent==1.2.1
|
||||
gevent==1.2.2
|
||||
webassets==0.12.1
|
||||
portalocker
|
||||
|
Loading…
x
Reference in New Issue
Block a user