Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add a 'Clear Cache' button #708

Merged
merged 2 commits into from
Feb 17, 2017
Merged

Add a 'Clear Cache' button #708

merged 2 commits into from
Feb 17, 2017

Conversation

kegsay
Copy link
Member

@kegsay kegsay commented Feb 17, 2017

This deletes the IndexedDB database and reloads the page.

This solely exists as a get-out clause for users in case the indexedDB instance
gets corrupted. Hopefully we won't ever need to point users to it.

This deletes the IndexedDB database and reloads the page.

This solely exists as a get-out clause for users in case the indexedDB instance
gets corrupted. Hopefully we won't ever need to point users to it.
@@ -418,6 +418,14 @@ module.exports = React.createClass({
Modal.createDialog(BugReportDialog, {});
},

_onClearCacheClicked: function() {
MatrixClientPeg.get().store.deleteAllData().then(() => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.done?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. 8d6c3cd

return <div>
<h3>Clear Cache</h3>
<div className="mx_UserSettings_section">
<AccessibleButton className="mx_UserSettings_button danger"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How dangerous is it to go alone clear the cache?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You made a Zelda reference! /me swoons

It's deleting data, which I think is dangerous, and it will cause a long resync potentially which is bad. I don't have any strong feelings either way.

<div className="mx_UserSettings_section">
<AccessibleButton className="mx_UserSettings_button danger"
onClick={this._onClearCacheClicked}>
Clear Cache (triggers page refresh)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about, "Clear Cache and Reload"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. 8d6c3cd

@kegsay kegsay merged commit 5abcb91 into develop Feb 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants