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