Skip to content

Commit 717c754

Browse files
committed
Do not include index in cache checksum
Otherwise the cache will always be treated as stale Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 5bc29c8 commit 717c754

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/licensedcode/cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ def tree_checksum(tree_base_dir=licensedcode_dir, _ignored=_ignored_from_hash):
327327
NOTE: this is not 100% fool proof but good enough in practice.
328328
"""
329329
resources = resource_iter(tree_base_dir, ignored=_ignored, with_dirs=False)
330+
resources = (r for r in resources if licensedcode_cache_dir not in r)
330331
hashable = (pth + str(os.path.getmtime(pth)) + str(os.path.getsize(pth)) for pth in resources)
331332
hashable = ''.join(sorted(hashable))
332333
hashable = hashable.encode('utf-8')

0 commit comments

Comments
 (0)