Skip to content

Commit 288d912

Browse files
xjf729mr-c
authored andcommitted
add exclude_cache_cmd domain for CMDCache
1 parent 1e5d807 commit 288d912

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cwl/sphinx/runcmd.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@ class Singleton(_Singleton("SingletonMeta", (object,), {})):
4040

4141
class CMDCache(Singleton):
4242
cache = {}
43+
exclude_cache_cmd = {hash("cat output.txt")}
4344

4445
def get(self, cmd, working_directory):
4546
h = hash(cmd)
46-
if h in self.cache:
47+
if h in self.exclude_cache_cmd:
48+
return run_command(cmd, working_directory)
49+
elif h in self.cache:
4750
return self.cache[h]
4851
else:
4952
result = run_command(cmd, working_directory)

0 commit comments

Comments
 (0)