Cache Clearing for Rendered HTML Field

I am using an HTML field for rendering everything is working fine. My case is the field gets displayed only on save. On clicking New again I can still see the previous rendered html field untill i refresh the page.

Any permanent solution for that ?

This happens to be a lot of time.

$bench clear-cache
$bench restart / start

and instead of simple refresh, I try clear cache refresh in chrome (ctrl+shift+r) or (cmd+shit+r).

It gets messy with me too sometimes when HTML fields do not render as required… but this is best I could do. Let me know if you land up with a better solution for you in future. :slight_smile:


Parth Joshi

One more thing, after rendering I just noticed that old docs are also affected by latest rendering.
So i thought of saving the doc again once rendered.

My Complete case–>

1- User enter all the fields and click save.
2- After saving, the html field gets rendered.
3- Once rendered, it again gets saved so that the field (HTML field) gets saved on permanent basis.

Currently I’m trying to save again once rendered, in the after_save event but its running in a loop.

Any idea to do so ?

In short, i want my rendered field to be saved too but because of caching the latest one is displayed in all the previous enteries.
Also on refresh, every rendered field is gone.

Any suggestions will be appreciated

if these fields you are have issue are part of web portal forms then with latest bench version (4.1.0+) you can also clear cache for website.

bench --site what-ever-your-sitename clear-website-cache