Clear Cache in custom app

I am trying to learn how to create apps and Im new at this, the thing is that I have no dev enviroment, just the console from chrome so far(I dont know if there is other way to debug), and I’m testing some bassic programming things like fetching values, and sending messages with frappe.throw.
The problem comes when I edit the .py file, the browser doesn’t take the changes, and I thought that with bench clear-cache or bench clear-website-cache it will be ok, but it isn’t.

The only thing that can make the changes to show up is with bench restart.

Is there another way? or I am doing the things wrong?

Hi @josmeldiaz21,

welcome! In a productive configuration, it is normal that you have to

$ bench migrate
$ bench restart

in order to get changes of server-side code up and running. Have you considered to use a local VM image with a develop config to play around with?

yes, I have a VM in a develop enviroment, But I changed from production to develop(I mean I installed ERPNext production and then I change to develop in the site). should I install erpnext with --develop?(I had problems doing this) in this case,
I would have to do this too?

If you have a develop configuration, the bench needs to be manually started (bench start), but will pick up changes automatically. A production configuration has supervisor run the bench and so on.

Not sure what your current VM status is, maybe the easiest would be to start with a clean VM and use the easy installer with --develop. Then you can focus on the actual issue…

Ok, thanks man, I figured out what was happening,
I was installing erpnext develop in ubuntu 18.04, and turns out that redis throws error asking for ubuntu 14.04. Can I install develop mode in 18.04? I am doing something wrong?

I think there are open issues with ERPNext in ubuntu 18.04 LTS. ubuntu 16.04 LTS will work fine. If you can, use a vanilly ubuntu 16.04 and start from there (safe choice)…