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)
|
key = res_template(member_key, params)
|
||||||
|
|
||||||
keys = self.redis.smembers(key)
|
scan_key = 'scan:' + key
|
||||||
params['scan:' + key] = keys
|
# 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
|
||||||
|
|
||||||
match_templ = match_templ.encode('utf-8')
|
match_templ = match_templ.encode('utf-8')
|
||||||
|
|
||||||
|
@ -9,6 +9,6 @@ brotlipy
|
|||||||
pyyaml
|
pyyaml
|
||||||
werkzeug
|
werkzeug
|
||||||
webencodings
|
webencodings
|
||||||
gevent==1.2.1
|
gevent==1.2.2
|
||||||
webassets==0.12.1
|
webassets==0.12.1
|
||||||
portalocker
|
portalocker
|
||||||
|
Loading…
x
Reference in New Issue
Block a user