108
121
"""Scan all files and remove entries where the cache entry is obsolete.
110
123
Obsolete entries are those where the file has been modified or deleted
113
126
# FIXME optimisation opportunity, on linux [and check other oses]:
114
127
# rather than iteritems order, stat in inode order.
115
128
prep = [(ce[1][3], path, ce) for (path, ce) in self._cache.iteritems()]
118
131
for inum, path, cache_entry in prep:
120
133
fp = self._fingerprint(abspath)
123
136
cache_fp = cache_entry[1]
125
138
if (not fp) or (cache_fp != fp):
126
139
# not here or not a regular file anymore