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