(func)
| 331 | |
| 332 | @staticmethod |
| 333 | def delete_corrupted_items(func): |
| 334 | hashes = Cache.get_items_hashes(func, None) |
| 335 | fn_name = getfnname(func) |
| 336 | paths = [relative_path(f'{Cache.cache_directory}{fn_name}/{r}.json') for r in hashes] |
| 337 | corrupted_items_removed = sum(_delete_corrupted_cached_items(paths)) |
| 338 | if corrupted_items_removed: |
| 339 | item_plural = pluralize('item', corrupted_items_removed) |
| 340 | print(f"Deleted {corrupted_items_removed} corrupted {item_plural}") |
| 341 | else: |
| 342 | print("No corrupted items found") |
| 343 | |
| 344 | return corrupted_items_removed |
| 345 | |
| 346 | @staticmethod |
| 347 | def generate_cache_path_from_hash(func, hash): |
nothing calls this directly
no test coverage detected