Skip to content

Commit

Permalink
Clear cache storage data (electron#12546)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethlu authored and codebytere committed Apr 13, 2018
1 parent ad2bacc commit a0cac05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions atom/browser/api/atom_api_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ uint32_t GetStorageMask(const std::vector<std::string>& storage_types) {
storage_mask |= StoragePartition::REMOVE_DATA_MASK_WEBSQL;
else if (type == "serviceworkers")
storage_mask |= StoragePartition::REMOVE_DATA_MASK_SERVICE_WORKERS;
else if (type == "cachestorage")
storage_mask |= StoragePartition::REMOVE_DATA_MASK_CACHE_STORAGE;
}
return storage_mask;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/api/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Clears the session’s HTTP cache.
`scheme://host:port`.
* `storages` String[] (optional) - The types of storages to clear, can contain:
`appcache`, `cookies`, `filesystem`, `indexdb`, `localstorage`,
`shadercache`, `websql`, `serviceworkers`.
`shadercache`, `websql`, `serviceworkers`, `cachestorage`.
* `quotas` String[] (optional) - The types of quotas to clear, can contain:
`temporary`, `persistent`, `syncable`.
* `callback` Function (optional) - Called when operation is done.
Expand Down

0 comments on commit a0cac05

Please sign in to comment.