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