aboutsummaryrefslogtreecommitdiff
path: root/b4/command.py
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-03-20 16:35:08 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-03-20 16:35:08 -0400
commit0f63a3f6a7398321bd799c7b778e0e721c811287 (patch)
treed617ad0aa9e361e8bb579941ee22a7149cf1c5ed /b4/command.py
parent4cad662b69be9fa62460a342e2fd1aa87a7bd548 (diff)
downloadb4-0f63a3f6a7398321bd799c7b778e0e721c811287.tar.gz
Add caching layer
Many lore.kernel.org operations can be repeated within quick succession of each-other (e.g. someone reruns a query with -t). This commit adds a caching layer that keeps lookups in local cache for 10 minutes (default). It can be made longer or shorter by editing the 'cache-expire' setting, or running "b4 am" with -C,--no-cache. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/command.py')
-rw-r--r--b4/command.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/b4/command.py b/b4/command.py
index 9c2cbe9..eca416d 100644
--- a/b4/command.py
+++ b/b4/command.py
@@ -71,6 +71,8 @@ def cmd():
cmd_mbox_common_opts(sp_am)
sp_am.add_argument('-v', '--use-version', dest='wantver', type=int, default=None,
help='Get a specific version of the patch/series')
+ sp_am.add_argument('-C', '--no-cache', dest='nocache', action='store_true', default=False,
+ help='Do not use local cache')
sp_am.add_argument('-t', '--apply-cover-trailers', dest='covertrailers', action='store_true', default=False,
help='Apply trailers sent to the cover letter to all patches')
sp_am.add_argument('-T', '--no-add-trailers', dest='noaddtrailers', action='store_true', default=False,