> For the complete documentation index, see [llms.txt](https://nownodes.gitbook.io/xmr-monero/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nownodes.gitbook.io/xmr-monero/monero-xmr/flush-cache.md).

# Flush cache

## Flush bad transactions and blocks from the cache

> Removes invalid or bad transactions and/or blocks from the daemon cache.

```json
{"openapi":"3.0.3","info":{"title":"Monero Daemon RPC API","version":"1.0.0"},"servers":[{"url":"https://xmr.nownodes.io"}],"security":[{"api-keyAuth":[]}],"components":{"securitySchemes":{"api-keyAuth":{"type":"apiKey","in":"header","name":"api-key"}}},"paths":{"/json_rpc":{"post":{"tags":["Flush cache"],"summary":"Flush bad transactions and blocks from the cache","description":"Removes invalid or bad transactions and/or blocks from the daemon cache.","operationId":"flush_cache","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"id":{"type":"string"},"method":{"type":"string"},"params":{"type":"object","properties":{"bad_txs":{"type":"boolean","description":"Flush bad transactions"},"bad_blocks":{"type":"boolean","description":"Flush bad blocks"}}}}}}}},"responses":{"200":{"description":"Cache flush result","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"jsonrpc":{"type":"string"},"result":{"type":"object","properties":{"status":{"type":"string","description":"General RPC status"},"untrusted":{"type":"boolean","description":"True if the result is untrusted due to bootstrap mode"}}}}}}}},"400":{"description":"Bad Request - invalid parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}
```
