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