Clear cached data for one site (not the whole cache)
browser_clear_site_cacheClear cached data for one specific site without wiping the entire Firefox cache; provide a schemeless domain like example.com and optionally choose which data kinds to remove.
Instructions
Clear cached data for a SINGLE site instead of the whole cache. MEASURED: this needs ClearDataService from resource://gre/modules/ClearDataService.sys.mjs, constructed with new, then deleteDataFromSite(site, {}, isUserRequest, flags, callback). Two traps: the site argument is a SCHEMELESS site (example.com, not https://example.com/), and the callback must be an object with onDataDeleted(resultFlags) — passing a plain function hangs forever. resultFlags 0 means every cleaner succeeded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | Schemeless site, e.g. example.com | |
| kinds | No | What to clear (default: all caches) |