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

Adds support for clear cache #1517

Merged
merged 2 commits into from
Aug 22, 2019
Merged

Adds support for clear cache #1517

merged 2 commits into from
Aug 22, 2019

Conversation

keianhzo
Copy link
Contributor

@keianhzo keianhzo commented Aug 6, 2019

Fixes #1454 Adds support for clearing the cache. At the moment just clears all the caches until with have a more complete spec to do it more granular. Also I've refactored sessions code and fixed:

  • Not all sessions were being recreated for methods that required session recreation
  • Removed the intermediate session stack as it's not really necessary we can handle it with the linked hashmap

Copy link
Contributor

@bluemarvin bluemarvin left a comment

Choose a reason for hiding this comment

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

A few comments:

  1. This probably belongs in Privacy and Security instead of developer options.
  2. Either it should be renamed to Clear Cookies and Site Data or we should give the user option as to what data is getting cleared.
    I know a user requested that we give them the option to just clear the cache and I think that is reasonable.

@keianhzo keianhzo force-pushed the developer_cache_clear branch from 53dc347 to 58f2033 Compare August 7, 2019 10:28
@keianhzo keianhzo requested a review from bluemarvin August 7, 2019 10:29
@keianhzo keianhzo force-pushed the developer_cache_clear branch from 58f2033 to 199d47e Compare August 7, 2019 10:35
@keianhzo
Copy link
Contributor Author

keianhzo commented Aug 7, 2019

@MortimerGoro @bluemarvin I've updated with the change request and also made some refactoring to remove the intermediate session stack that is not really necessary and that simplifies the sessionstack code a bit.

@bluemarvin
Copy link
Contributor

@keianhzo we should probably wait to land this until the UI spec has been updated? @jvonitter

@keianhzo
Copy link
Contributor Author

keianhzo commented Aug 9, 2019

@bluemarvin There was never UI spec for this one, was just adding a clear cache button. You mean to have a more complete spec make the "clear" more granular?

@bluemarvin
Copy link
Contributor

@bluemarvin There was never UI spec for this one, was just adding a clear cache button. You mean to have a more complete spec make the "clear" more granular?

Right, I was asking if we should wait for the spec with more details or land this and follow up once there is a spec.

@jvonitter
Copy link
Contributor

yes please wait for the spec. it's on Nadja's list and it'll be done soon

Copy link
Contributor

@bluemarvin bluemarvin left a comment

Choose a reason for hiding this comment

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

I think we should land this as is for 1.4 and then address further UX in 1.5 @jvonitter ?

@keianhzo keianhzo force-pushed the developer_cache_clear branch from bfb8a3e to f49a0a1 Compare August 19, 2019 11:22
@keianhzo keianhzo force-pushed the developer_cache_clear branch from f49a0a1 to 5b9e1a6 Compare August 21, 2019 20:25
@@ -290,6 +290,17 @@
<!-- The string labels an On/Off switch in the developer options dialog and is used to toggle enabling Servo. -->
<string name="developer_options_servo">Enable Servo</string>

<!-- The string labels the description text for the clear cookies and site data button in the
privacy options dialog. -->
<string name="developer_options_clear_cache_cookies_site_description">Cookies &amp; SiteData</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

Should SiteData be Site Data?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@keianhzo
Copy link
Contributor Author

keianhzo commented Aug 22, 2019

We have to leave out the descriptions from the spec as GV doesn't currently expose any API for getting the cache used disk space.

@bluemarvin bluemarvin merged commit 13233fb into master Aug 22, 2019
@ScottWitte
Copy link

I'm the original requester for this feature and I'm a little concerned. Am I right that you will have one button that clears cache, history, and cookies, much as with Mobile Safari? If so, in my experience that would be a mistake. A major reason for clearing the cache is so you can reload a page and be certain you have the most current content. That is especially important when developing and is just about the first thing any support or FAQ tells a user to do when troubleshooting. When something doesn't work as expected you can be certain it isn't just because some old code is still being used.

If you nuke everything just to clear the cache you force users to retype URLs, which is tedious and error-prone, especially in a VR interface, or to search for lost URLs, which can be difficult. I suggest you use the approach of all other browsers (except mobile Safari) and give users control over just what they want to clear. Look at mobile FireFox as a model.

Thanks for your consideration. Really excited to see how FxR is developing!

@bluemarvin
Copy link
Contributor

There are two buttons, one clears cache, one clears cookies and data.

@ScottWitte
Copy link

Excellent. Thanks for the clarification.

@bluemarvin bluemarvin deleted the developer_cache_clear branch August 26, 2019 16:03
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.

Add developer option to clear cache
5 participants