Copied to clipboard

Flag this post as spam?

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


  • Lars-Erik Aabech 349 posts 1100 karma points MVP 6x c-trib
    Feb 27, 2017 @ 09:40
    Lars-Erik Aabech
    0

    Refreshing cache when working out of process with the API

    I'm working on an automated acceptance test in which I spin up an instance of Umbraco using a custom boot manager. It's a bastard of @sitereactor's console example, and is created before the entire test run.

    Both the web and the tests run against the same SQL CE database.

    When I publish content using ContentService.SaveAndPublishWithStatus from the API set up by the custom boot manager, the content is published, but it's not put into the cache in the web instance.

    The obvious reason for this is that the "flexible load balancing" feature didn't trigger the cache refresh message.

    I haven't had time to try using a regular SQL Server or check inside the CE database. Is it because I use CE? Does the WebBootManager set up the events for cache refresh entries in the DB? (Just grasping at straws)

    Any hints appreciated.

  • Lars-Erik Aabech 349 posts 1100 karma points MVP 6x c-trib
    Feb 27, 2017 @ 20:54
    Lars-Erik Aabech
    0

    Oh well, debugged and found the purps. :)

    The core boot manager doesn't set up LB via the DB. Had to copy a snippet from the web boot manager. And while at it, of course there's a reference to HttpRuntime.AppDomainAppId, so some hardcore appdomain data setting had to be done.

    For anyone wanting to do this, there'll be stuff available in a few months.

Please Sign in or register to post replies

Write your reply to:

Draft