mjmlio / mjml-app

:email: The desktop app for MJML
http://mjmlio.github.io/mjml-app
MIT License
837 stars 79 forks source link

Refresh Cache/Get Latest Assets #185

Open dshastry opened 6 years ago

dshastry commented 6 years ago

Noticed today that if I link to external images/assets in an email template and make changes to those assets (eg: re-upload new file with same name), then the preview doesn't update to reflect. I assume this is because of caching within the application for performance reasons.

I tried to reload MJML from the option under the "View" menu, but doesn't work. I also tried quitting and restarting the app and sometimes this flushes the cache but most times doesn't.

Is there a way to clear cache and force retrieval of latest assets? If there isn't can we add that in via a button in the UI perhaps?

meriadec commented 6 years ago

Sounds useful. We may dig into https://github.com/electron/electron/blob/master/docs/api/session.md#sesclearcachecallback

dshastry commented 6 years ago

Awesome! Sounds good!

dpHARDIN commented 6 years ago

WORKAROUND For anyone encountering this issue, a quick way around while waiting on feature implementation is to

  1. Open View >Toggle Developer Tools in MJML App
  2. In Developer Tools select Network and select the box for Disable Cache.
  3. Go back to MJML Tools >Reload.

The changes should then reflect.

dshastry commented 6 years ago

Sweet! Just tried this and seems to work. So obvious but not at the same time. Thanks for sharing @dpHARDIN