Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kim Gordon 7 posts 36 karma points
    Feb 05, 2015 @ 11:32
    Kim Gordon
    0

    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:

        $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?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 05, 2015 @ 11:55
    Jan Skovgaard
    0

    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

  • Kim Gordon 7 posts 36 karma points
    Feb 05, 2015 @ 12:04
    Kim Gordon
    0

    I was under the impression that the debug should be set to true to disable the cache?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 05, 2015 @ 12:32
    Jan Skovgaard
    0

    Hi Kim

    Yup, you're absolutely right :) Was also what I meant but I got it switched around. Sorry 'bout that.

    /Jan

  • Kim Gordon 7 posts 36 karma points
    Feb 05, 2015 @ 16:32
    Kim Gordon
    0

    Hi Jan,

    Debug is set to true, but I do not have the feeling that it is disabling the cache :(

  • Pavel Budik 12 posts 71 karma points c-trib
    Jul 07, 2015 @ 15:33
    Pavel Budik
    0

    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

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies