MCPcopy Create free account
hub / github.com/AsyncFuncAI/deepwiki-open / store_wiki_cache

Function store_wiki_cache

api/api.py:487–502  ·  view source on GitHub ↗

Stores generated wiki data (structure and pages) to the server-side cache.

(request_data: WikiCacheRequest)

Source from the content-addressed store, hash-verified

485
486@app.post("/api/wiki_cache")
487async def store_wiki_cache(request_data: WikiCacheRequest):
488 """
489 Stores generated wiki data (structure and pages) to the server-side cache.
490 """
491 # Language validation
492 supported_langs = configs["lang_config"]["supported_languages"]
493
494 if not supported_langs.__contains__(request_data.language):
495 request_data.language = configs["lang_config"]["default"]
496
497 logger.info(f"Attempting to save wiki cache for {request_data.repo.owner}/{request_data.repo.repo} ({request_data.repo.type}), lang: {request_data.language}")
498 success = await save_wiki_cache(request_data)
499 if success:
500 return {"message": "Wiki cache saved successfully"}
501 else:
502 raise HTTPException(status_code=500, detail="Failed to save wiki cache")
503
504@app.delete("/api/wiki_cache")
505async def delete_wiki_cache(

Callers

nothing calls this directly

Calls 1

save_wiki_cacheFunction · 0.85

Tested by

no test coverage detected