Add documentation to cache.
(self, repo_url: str, docs_path: str)
| 82 | return None |
| 83 | |
| 84 | def add_to_cache(self, repo_url: str, docs_path: str): |
| 85 | """Add documentation to cache.""" |
| 86 | repo_hash = self.get_repo_hash(repo_url) |
| 87 | now = datetime.now() |
| 88 | |
| 89 | self.cache_index[repo_hash] = CacheEntry( |
| 90 | repo_url=repo_url, |
| 91 | repo_url_hash=repo_hash, |
| 92 | docs_path=docs_path, |
| 93 | created_at=now, |
| 94 | last_accessed=now |
| 95 | ) |
| 96 | |
| 97 | self.save_cache_index() |
| 98 | |
| 99 | def remove_from_cache(self, repo_url: str): |
| 100 | """Remove documentation from cache.""" |
no test coverage detected