Invalidate entire cache with lein figwheel

I ran into a few issues when reloading Fighweel's hot code where it doesn't reload whatever it needs to reload and the old state / code persists even though it's no longer in the original code and even if I re-run lein figwheel

.

What is the easiest way to clear all browser cache, all cache memory and everything else-I-don't-even-know-know-to-know cache to make sure there are no leftovers from the old version of the code?

+3


source to share


2 answers


Update 2: I noticed some caching issues, so I created bhauman / lein-figwheel # 667 to hopefully crush them once and for all. These changes should be released in Figwheel 0.5.16. I've also written more about how to serve up ClojureScript files in development .

Update: bhauman / lein-figwheel # 586 has been merged, which sets the correct cache headers to avoid being used. You shouldn't see legacy issues anymore when using lein-figwheel 0.5.12 or newer.




In Chrome on macOS, Command + Shift + R does a hard reboot, or you can long press the reboot button to be able to clear the cache. Make sure you have Chrome devtools open or you won't get options.

Chrome restart menu from long click

As a side note, I think the caching behavior you are seeing could be fixed with bhauman / lein-figwheel # 464 .

+2


source


In Chrome Cntl-F5, you need to reload the page, which often needs to be done. Your best bet is to configure your browser so that the cache is not used when the console is open, and always start from the open console. See this answer: Disabling Chrome Cache for Website Development .



When things really get messed up from the command line, go lein clean

. You don't need to do this very often. What exactly is cleared (removed from disk) depends on what is in project.clj

for the key :clean-targets

.

0


source







All Articles