Erpnext Hooks not working properly

I have multiple production erpnext instances (dns based multitenancy) running on a server. I have made some changes to the code, added a few files in erpnext app (not done as a new app because the change is minor one) and modified the file.

The problem is the changes made as such are seen in 1 instance of erpnext while other instances do not show the changes. The file added via is loaded in 1 instance and not loaded in other instances.

What might be causing this ?

Caching, very possibly. Have you cleared caches and restarted supervisorctl?

If it’s a file served to the browser, it could be a browser caching issue too, though Frappe has gotten better about that in recent versions.

I realized that it must be browser issue and so I tried private browsing mode, switched browsers, and tried clearing browser cache by Ctrl + Shift + R. Nothing worked.

No. Did not try that.

Tried bench clear-cache → Did not work
bench --site clear-cache → Worked