MCPcopy Index your code
hub / github.com/FSoft-AI4Code/CodeWiki / cleanup_expired_cache

Method cleanup_expired_cache

codewiki/src/fe/cache_manager.py:106–119  ·  view source on GitHub ↗

Remove expired cache entries.

(self)

Source from the content-addressed store, hash-verified

104 self.save_cache_index()
105
106 def cleanup_expired_cache(self):
107 """Remove expired cache entries."""
108 expired_entries = []
109 cutoff = datetime.now() - timedelta(days=self.cache_expiry_days)
110
111 for repo_hash, entry in self.cache_index.items():
112 if entry.created_at < cutoff:
113 expired_entries.append(repo_hash)
114
115 for repo_hash in expired_entries:
116 del self.cache_index[repo_hash]
117
118 if expired_entries:
119 self.save_cache_index()

Callers

nothing calls this directly

Calls 1

save_cache_indexMethod · 0.95

Tested by

no test coverage detected