Copied to clipboard

Flag this post as spam?

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


  • Simon Dingley 1349 posts 3157 karma points c-trib
    15 days ago
    Simon Dingley
    0

    PageCacheRefresher CacheUpdated Event Not Fired on Slave Server

    I have a site load balanced across two servers using flexible load balancing and for some reason, the slave server is currently not executing the CacheUpdated event on the slave server and is not showing recent changes.

    The distributed cache last updated values are the same on both servers but only the master server logs show the cache updated event having been fired. As such, the slave server is currently behind the master.

    There are no relevant entries in the log file to suggest an error occurred so I'm not entirely sure what is going on or how this can happen with the lastupdated id being updated but the changes not actually being visible.

    Any ideas?

    The event handler is wired up as follows:

    protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
    {
        CacheRefresherBase<PageCacheRefresher>.CacheUpdated += PageCacheRefresher_CacheUpdated;
    }
    
    private static void PageCacheRefresher_CacheUpdated(PageCacheRefresher sender, CacheRefresherEventArgs e)
    {
        // Removed check for UmbracoContext - See https://issues.umbraco.org/issue/U4-10150 for reasons why
        NodeHelper.Clear();
        LogHelper.Info<EventHandlers>("Page cache refreshed.");
    }
    

    Thanks, Simon

    P.S. I should point out that we had a similar issue before but that was resolved

  • Simon Dingley 1349 posts 3157 karma points c-trib
    15 days ago
    Simon Dingley
    100

    Update: I've removed the slave from the load balancer and recycled the application pool. The CacheUpdated event handler is working again but the cause of the problem is still unexplained!

Please Sign in or register to post replies

Write your reply to:

Draft