Im developing a lot of Umbraco sites and since Umbraco 7 came along with Angularjs backend I have been doing a lot of backend extensions and custom properties :). I really like angularjs and Umbracos approach to it, but Im having one problem over and over, the hardcore cache. Everything is cached all the time. I can clear my cache and and use hardreload, so it is not so much of a problem for me, but it is for my users.
I have been thinking about throwing something like this:
$templateCache.removeAll();
In the login controller, so the cache is removed for users everytime they log in, but I dont know if this is the correct solution or if there is a better one?
Stopping Umbraco/Angularjs cache
Im developing a lot of Umbraco sites and since Umbraco 7 came along with Angularjs backend I have been doing a lot of backend extensions and custom properties :). I really like angularjs and Umbracos approach to it, but Im having one problem over and over, the hardcore cache. Everything is cached all the time. I can clear my cache and and use hardreload, so it is not so much of a problem for me, but it is for my users.
I have been thinking about throwing something like this:
In the login controller, so the cache is removed for users everytime they log in, but I dont know if this is the correct solution or if there is a better one?
Hi Kim
Have you also made sure to set debug to false in the web.config file? This prevent ClientDependency from caching the backoffice files.
/Jan
I was under the impression that the debug should be set to true to disable the cache?
Hi Kim
Yup, you're absolutely right :) Was also what I meant but I got it switched around. Sorry 'bout that.
/Jan
Hi Jan,
Debug is set to true, but I do not have the feeling that it is disabling the cache :(
Hi,
when debug=true, only cache for CSS and JS files gets busted. For html views, there is no cache buster OOTB. I tried to overcome it like this: https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/60927-Force-plugin-views-to-be-cleared-from-cache. See if it works for you.
Pavel
is working on a reply...