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