-
Notifications
You must be signed in to change notification settings - Fork 64
Force a Refresh
Home Assistant has a very sticky cache. Sometimes, it's so sticky that conventional cache clearing methods don't work the first or second time you try them. I've even seen cases where cache from several weeks ago somehow manages to show up and then disappear, which shouldn't even be possible.
I'm not entirely sure how the Home Assistant devs were able to make the cache so sticky, but I can guarantee you they made it that way so that we can all experience the tremendous speed boosts and responsiveness that a good caching system provides. It's not a bug, it's a feature.
So, how do we clear that sticky persistent cache?
- If you are interacting with Home Assistant through a web browser, try clicking on the browser's refresh button.
- If the refresh button didn't work, try clearing the browser's cache and then click the refresh button once more
Restart your Home Assistant instance
- Click on Settings
- Click on System
- Click the Power Icon in the upper right hand corner
- In the menu that pops up, click on Restart Home Assistant
- A confirmation box will appear. Click on RESTART
At this point, Home Assistant will take a moment to restart. Depending on your system setup, this could take a minute or two. After it comes back, check to see if your issue has been resolved.
Depending on how you interact with Home Assistant, you will want to choose the option below that best fits your use case.
First, I open the chromium developer tools. This can be done one of three ways:
- Right-click anywhere in your browser window, then scrolldown to "Inspect"
- Click the three dots in the upper right hand corner, choose "More Tools" and then "Developer Tools"
- Hold down Ctrl + Shift and press I (i for inspect)
With the developer tools open, open the Network tab and check the box marked "Disable cache"
At this point, If you press F5 or click your browser's refresh button, you will see the the developer tools screen fill with information related to your page re-load. If you do not see a console window at the bottom of the developer tools, pressing the ESC key will likely toggle it back into view.
In the console window, you might find some information that could be helpful for you in the future. For instance, if you ask yourself "Do I actually have Firemote version 2.1.6 installed right now?" you could find that answer in the console window:
These next steps I do to ensure a full proper refresh are quite heavy handed, and it's possible that not all of these steps are required. I have found that in my setup, this seems to work almost all of the time so it's what I do.
Click on the clear buttons in both the network tab and the console.
Next, I hold down CTRL + ALT + SHIFT and then click the browser's reload button
This seems to be the magic process that works. It may not be appropriate in every situation, but it works for me.
First, click on "Settings" in your Home Assistant App
Then, select Companion App
Next, select Debugging:
Then finally, click on Reset Frontend Cache
This seems to work most of the time. If it doesn't work right away, I suggest closing the Home Assistant app and re-opening it. If it's still not updated, try the above steps again.
This one is the trickiest for me, I usually have to repeat these steps 2 or 3 times before I get anywhere. Hopefully I will someday find a better way, but as of today this is what I do.
Swipe the screen from top to bottom to access the pulldown menu. Click the gear icon to access the settings menu
Next, locate and click on the Apps menu
Then, scroll through your apps until you find the Home Assistant app, then click on it
The App Info menu should be open, showing the details for the currently installed Home Assistant App. Find "Storage" and click on it
You should now see the size of the current app cache, and a button to clear the app's cache. Click on the "Clear cache" button
Here is where it gets a little interesting (or frustrating) The screen shows that the cache has been cleared
BUT... if you click back one menu, and step back into this one, you might find this
The cache has quickly grown back from zero. It's nowhere near the size it was when we first got here, but it's not empty either. I'm uncertain if this behavior is the reason why it sometimes takes multiple tries, a Force Stop, or a device reboot to ultimately show me the updated content, but either way it can be very frustrating.