Copied to clipboard

Flag this post as spam?

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


  • Johan Plesner Hamann 105 posts 199 karma points
    Jun 20, 2014 @ 08:31
    Johan Plesner Hamann
    0

    stop cache for each domain - Umbraco version 7

    How to stop cache for each domain, i´m using Vorto 1.2 and som of the languages is not updating.

    Or is there something else I can do?

    thanks, Johan

    Umbraco version 7.1.4 - Vorto 1.2

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 20, 2014 @ 17:27
    Jan Skovgaard
    0

    Hi Johan

    Is it only content translated using Vorto that does not update unless the cache is refreshed?

    /Jan

  • Johan Plesner Hamann 105 posts 199 karma points
    Jun 20, 2014 @ 17:38
    Johan Plesner Hamann
    0

    Hey,

    When I have login to .dk and edit it, it saves to the Danish property. And not .com, .eu or .de

    Thanks. Johan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 20, 2014 @ 20:14
    Jan Skovgaard
    0

    Hi Johan

    Ah ok, and if you login to .de it saves .de only for instance?

    /Jan

  • Johan Plesner Hamann 105 posts 199 karma points
    Jun 20, 2014 @ 20:22
    Johan Plesner Hamann
    0

    that is the behaviour. And the same ar happening on a Umbraco 6 site of mine. sounds like you know what's going on.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 20, 2014 @ 20:28
    Jan Skovgaard
    0

    Hi Johan

    Well in a vorto context I'm not sure how it's supposed to work since I have not tried using it myself yet.

    However when editing content on multi-lingual pages with different domains etc. usually changes made to for instance .de will not be visible right away if they're made when you're logged in with the danish editor for instance. Changes made to pages on the danish site will be visible straight away but changes made to others languages will first appear after some time due to some caching I think.

    I remember seeing this behavior in early releases of v4.0.x, which confused me a lot back then. Thought it was changed in later releases but what you describe above seems like the behavior is back. Not sure if it's expected or not. But I saw that you made a post in the Vorto forum as well so hopefully Matt knows how you can fix the issue :)

    But sounds like your setup is having 1-1 sites rather than having 1 site where properties are translated using Vorto?

    /Jan

  • Johan Plesner Hamann 105 posts 199 karma points
    Jun 20, 2014 @ 21:40
    Johan Plesner Hamann
    0

    will i don't like the behaviour,i have some clients on the side right now,so i think it's a big problem.but we haven't gone live yet and they can't see the behaviour. hopefully i can get a fixed by then. the only solution i can do now is to touch the web.config,or even better i could have an event to do it for me, if you think that an event will fix my problem could you point me to the right direction please. It is a one side solution.

    thank you i really appreciate your help

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 20, 2014 @ 22:35
    Jan Skovgaard
    100

    Hi Johan

    Yup it's not ideal at all - But could be a Vorto issue as well. But seen the described behavior before though.

    But recycling the app pool is not ideal and it will not prevent your editors from having the issue from time to time anyway unless you recycle it very often, which should not be necessary. But if you think it can solve anything you should be able to setup a recycle interval on the app pool on your IIS.

    But that's not really a good solution - Hope Matt perhaps have some ideas about it.

    /Jan

  • Johan Plesner Hamann 105 posts 199 karma points
    Jun 25, 2014 @ 10:38
    Johan Plesner Hamann
    1

    If there is anyone who is interested, this is my solution and it works fine for now.

    Thanks for your help Jan

     public class DateFolderEvents : ApplicationEventHandler
    {
        protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
        {
            Umbraco.Core.Services.ContentService.Published += ContentService_Published;
            base.ApplicationStarted(umbracoApplication, applicationContext);
        }
        private void ContentService_Published(Core.Publishing.IPublishingStrategy sender, Core.Events.PublishEventArgs<Core.Models.IContent> e)
        {
            RestartWebApplication();
        }
    
    
    
         public static bool RestartWebApplication()
        {
            bool Error = false;
            try
            {
                // *** This requires full trust so this will fail
                // *** in many scenarios
                HttpRuntime.UnloadAppDomain();
            }
            catch
            {
                Error = true;
            }
    
            if (!Error)
                return true;
    
            // *** Couldn't unload with Runtime - let's try modifying web.config
            string ConfigPath = HttpContext.Current.Request.PhysicalApplicationPath + "\\web.config";
    
            try
            {
                System.IO.File.SetLastWriteTimeUtc(ConfigPath, DateTime.UtcNow);
            }
            catch
            {
                return false;
            }
    
            return true;
        }
    }
    
Please Sign in or register to post replies

Write your reply to:

Draft