(repo_id, manifest_data)
| 348 | |
| 349 | |
| 350 | def _invalidate_plugin_detail_cache(repo_id, manifest_data): |
| 351 | manifest = manifest_data.get("manifest", manifest_data) |
| 352 | _, metadata_base_url = _resolve_manifest_base_urls(manifest) |
| 353 | keys = [] |
| 354 | for p in manifest.get("plugins", []): |
| 355 | url = p.get("manifest_url", "") |
| 356 | if not url: |
| 357 | continue |
| 358 | if metadata_base_url and not url.startswith(("http://", "https://")): |
| 359 | url = f"{metadata_base_url}/{url}" |
| 360 | keys.append(f"plugin_detail:{repo_id}:{hashlib.md5(url.encode()).hexdigest()}") |
| 361 | if keys: |
| 362 | cache.delete_many(keys) |
| 363 | |
| 364 | |
| 365 | def _unmanage_dropped_slugs(repo, new_manifest_data): |
no test coverage detected