MCPcopy Create free account
hub / github.com/ExtendDB/extenddb / invalidate_cache

Method invalidate_cache

tests/management_helpers.py:399–416  ·  view source on GitHub ↗

POST /management/cache/invalidate. ``auth`` defaults to admin credentials; pass a tuple to test auth gating.

(
        self,
        scope: str,
        selectors: dict | None = None,
        *,
        auth=None,
    )

Source from the content-addressed store, hash-verified

397 # -- Cache (admin break-glass) --
398
399 def invalidate_cache(
400 self,
401 scope: str,
402 selectors: dict | None = None,
403 *,
404 auth=None,
405 ) -> requests.Response:
406 """POST /management/cache/invalidate.
407
408 ``auth`` defaults to admin credentials; pass a tuple to test auth gating.
409 """
410 body = {"scope": scope, "selectors": selectors or {}}
411 return requests.post(
412 f"{self.base_url}/cache/invalidate",
413 json=body,
414 auth=auth or self.admin_auth,
415 timeout=self.timeout, verify=self.verify,
416 )

Calls 1

postMethod · 0.80