MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / clear_ai_cache

Function clear_ai_cache

webapp_modern.py:19217–19237  ·  view source on GitHub ↗

Clear AI response cache

()

Source from the content-addressed store, hash-verified

19215 # Map root paths to actual directories
19216 if path == '/' or path == '':
19217 # List main directories
19218 return jsonify([
19219 {'name': 'data_stolen', 'is_directory': True, 'path': '/data_stolen'},
19220 {'name': 'scan_results', 'is_directory': True, 'path': '/scan_results'},
19221 {'name': 'crackedpwd', 'is_directory': True, 'path': '/crackedpwd'},
19222 {'name': 'vulnerabilities', 'is_directory': True, 'path': '/vulnerabilities'},
19223 {'name': 'logs', 'is_directory': True, 'path': '/logs'},
19224 {'name': 'backups', 'is_directory': True, 'path': '/backups'},
19225 {'name': 'uploads', 'is_directory': True, 'path': '/uploads'}
19226 ])
19227
19228 # Map paths to actual directories
19229 actual_path = ""
19230 if path.startswith('/data_stolen'):
19231 actual_path = _resolve_loot_path('/data_stolen', 'loot/data_stolen', path)
19232 if actual_path is None:
19233 return jsonify(_network_loot_dirs('loot/data_stolen', '/data_stolen'))
19234 elif path.startswith('/scan_results'):
19235 actual_path = _resolve_loot_path('/scan_results', 'output/scan_results', path)
19236 if actual_path is None:
19237 return jsonify(_network_loot_dirs('output/scan_results', '/scan_results'))
19238 elif path.startswith('/crackedpwd'):
19239 actual_path = _resolve_loot_path('/crackedpwd', 'loot/credentials', path)
19240 if actual_path is None:

Callers

nothing calls this directly

Calls 2

clear_cacheMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected