cache switch - what does it do?

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4267
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

cache switch - what does it do?

Unread post by Pallid Planetoid » 2023-12-04, 10:55

Forgive me my ignorance

but whats does https://addons.palemoon.org/addon/cacheswitch/ do?

I see two check marks for Mem and Disk - for Memory cache and Disk cache --- all find and dandy but whats does the add on do? (i.e. what does toggling the check marks do?)

Thanks
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35259
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: cache switch - what does it do?

Unread post by Moonchild » 2023-12-04, 12:52

UXP has a 2-tiered cache system for web content. One part is a cache in RAM, the other is a cache on disk. See about:cache for details on the status in your current browsing session.
This extension simply toggles either of those two caching features on or off, nothing more, nothing less.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
jobbautista9
Keeps coming back
Keeps coming back
Posts: 770
Joined: 2020-11-03, 06:47
Location: Philippines
Contact:

Re: cache switch - what does it do?

Unread post by jobbautista9 » 2023-12-04, 12:56

The checkboxes simply toggle the boolean prefs browser.cache.memory.enable and browser.cache.disk.enable respectively in about:config without you having to go to about:config. Nowadays I probably use it more for the clear cache function though, which is just a right-click menu away. I never really have a shortage of RAM so the first pref is pretty useless to me, and I don't do so much web dev either that I'd always want to bypass browser cache.

MozillaZine has articles on how those prefs work which I linked into the pref names.
Off-topic:
Anyway I probably should've rebranded that add-on as CacheBox when I did the rewrite since it clearly doesn't look like a switch anymore :P
Image

merry mimas

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

Mima avatar by 絵虎. Pixiv post: https://www.pixiv.net/en/artworks/15431817

Image

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35259
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: cache switch - what does it do?

Unread post by Moonchild » 2023-12-04, 13:36

Off-topic:
jobbautista9 wrote:
2023-12-04, 12:56
Anyway I probably should've rebranded that add-on as CacheBox when I did the rewrite since it clearly doesn't look like a switch anymore :P
I think the name cache switch makes a lot more sense. you're switching them on or off, after all, regardless of how it visually looks with a checkbox :P
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4267
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: cache switch - what does it do?

Unread post by Pallid Planetoid » 2023-12-04, 16:37

So I'm assuming the "Check" mark means each respective pref is "enabled" and visa versa (which wasn't explained in the add-on description)?

So why would one want to disable either (as opposed to using the default "enabled" for both)? (i.e. what is the advantage of disabling [unchecking] either?)

Is browser performance in regards to either Memory and/or Disk cache a factor?

Or is performance not the purpose of this add-on, but rather is used for "testing" in some manner?

Am I correct to assume leaving both (the default) "enabled" is the expected setting for both (and should be the case for the most part)?

In reference to "about:cache" - not sure what this tells me:
about-cache.png
Btw, jobbautista9 -- testing this extension it appears to me what I found is the "check" for displaying or not displaying the reference to "Cache:" (preceding the two check values for enabling/disabling the two cache functions) gets "confused" presumably (for lack of a better word) - in as much as I'd assume a "check" there (at that first option) is expected to display the text "Cache:" on the Toolbar and visa versa - however (could be wrong, but this is what I recall when I tried the extension out and have since removed it) what I found was in some cases (when toggling this option repeatedly and exiting/starting the browser as well) it will do this and in other cases it does the opposite (i.e. in some cases a "check" for this option does not display the text (reference to) "Cache" in which case the a non-check does display the "Cache:" text preceding the two cache pref check marks.
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4267
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: cache switch - what does it do?

Unread post by Pallid Planetoid » 2023-12-04, 17:03

jobbautista9 - Oh and I might as well mention here "off-topic" as opposed to starting an entirely new topic:
Off-topic:
Upon testing your "BrowserTickTock" extension I found that the option to display the time (number of minutes) the (current) browser (session) is used (not sure of the exact nomenclature you use) does not remain (does not get retained upon exiting the browser) - the next time the browser is used the "default" is the "date" (that once again gets displayed) as I recall. In as much as date/time is already present on the Taskbar - I find no need for either - so my preference would be to see displayed the time the browser is used for the current session as opposed to unnecessary redundancy. Needing to reset this every time I use the browser however is an unnecessary "annoyance" that was a deal breaker for me (and enough to remove the extension in my case unfortunately).

More to the point, where I would (personally) locate the extension would be very close to directly over where the System Time/Date gets displayed this redundancy is not appealing (aesthetically) to see directing over the System Time/Date display another Date or time. On the other hand, the browser session is fine - but to require the user to be mindful to set this every time the browser is used is a "nuisance" that isn't worth the effort for the most part.

In my opinion, there should be an option to make this option get saved so that it remains the option as opposed to requiring this option to get reset each time the browser is used.
Oh and thanks all for all the really great feedback! :thumbup:
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

Potkeny
Fanatic
Fanatic
Posts: 128
Joined: 2018-08-03, 17:00

Re: cache switch - what does it do?

Unread post by Potkeny » 2023-12-04, 17:16

Pallid Planetoid wrote:
2023-12-04, 16:37
So why would one want to disable either (as opposed to using the default "enabled" for both)? (i.e. what is the advantage of disabling [unchecking] either?)

Is browser performance in regards to either Memory and/or Disk cache a factor?

Or is performance not the purpose of this add-on, but rather is used for "testing" in some manner?
CacheSwitch provides two checkbox toggles in your browser's status bar, one for memory cache, and one for disk cache. Pretty useful if you're a web developer who wants to see changes right away.

It also has the option to clear your cache, which is handy if you don't like clearing cache via the browser's preferences or History menu.
I would guess its for seeing changes right away during website development.

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4267
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: cache switch - what does it do?

Unread post by Pallid Planetoid » 2023-12-04, 17:24

Potkeny wrote:
2023-12-04, 17:16
I would guess its for seeing changes right away during website development.
So you're implying this:
Pallid Planetoid wrote:
2023-12-04, 16:37
... Or is performance not the purpose of this add-on, but rather is used for "testing" in some manner?
Which is what I initially thought is perhaps the likely main purpose of the extension...

But it also crossed my mind however - wouldn't the developer simply want to just clear cache (to get the results as to what our saying is the reason)?
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

Potkeny
Fanatic
Fanatic
Posts: 128
Joined: 2018-08-03, 17:00

Re: cache switch - what does it do?

Unread post by Potkeny » 2023-12-04, 17:39

Clearing the cache every time you did a little change is more clicks than turning it off for the duration of the development, so I can understand why one would do that, especially if you can turn it off with just a handy checkbox.

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4267
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: cache switch - what does it do?

Unread post by Pallid Planetoid » 2023-12-04, 17:51

Potkeny wrote:
2023-12-04, 17:39
Clearing the cache every time you did a little change is more clicks than turning it off for the duration of the development, so I can understand why one would do that, especially if you can turn it off with just a handy checkbox.
Hmm, OK - you're saving the ONE click to clear cache ;) Got it. :)
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35259
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: cache switch - what does it do?

Unread post by Moonchild » 2023-12-04, 22:27

Pallid Planetoid wrote:
2023-12-04, 17:51
Hmm, OK - you're saving the ONE click to clear cache ;) Got it. :)
no, if you're actively developing on pages you'd have to clear the cache every reload. that's a total pain.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4267
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: cache switch - what does it do?

Unread post by Pallid Planetoid » 2023-12-05, 01:07

Got it - thanks :thumbup:
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

Post Reply