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