MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / _invalidate_plugin_detail_cache

Function _invalidate_plugin_detail_cache

apps/plugins/api_views.py:350–362  ·  view source on GitHub ↗
(repo_id, manifest_data)

Source from the content-addressed store, hash-verified

348
349
350def _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
365def _unmanage_dropped_slugs(repo, new_manifest_data):

Callers 1

postMethod · 0.85

Calls 2

getMethod · 0.45

Tested by

no test coverage detected