Step by Step, Little by Little (2)

Posted on May 18, 2015 in umbraco

For the past few days, this site has been running the latest 7.3.0 + dev-v7-contentcache branches... and NuCache in place of the Xml cache. This post has been written, previewed and published, and no Xml whatsoever has been involved.

That is not entirely true: if you hit a random Url on the site, you land on the 404 page, which is found by running an XPath query on the content tree. This has not changed, and it still works. In other words, no Xml, but XPath or Xslt if you want.

And strongly-typed models, and basically everything that works with the Xml cache. In addition, NuCache offers for example "instant" preview of the whole site, in-memory cached medias, and performance improvements.

The switch is done somewhere in the WebBootManager class:

var publishedCachesService =
    // use the Xml cache
    //new PublishedCache.XmlPublishedCache.PublishedCachesService(
    //    ApplicationContext.Current.Services,
    //    ApplicationContext.Current.DatabaseContext, 
    //    ApplicationContext.Current.ApplicationCache.RequestCache,
    //    _isForTesting, false);
    // use the NuCache
    new PublishedCache.NuCache.FacadeService(
        ApplicationContext.Current.Services,
        ApplicationContext.Current.DatabaseContext);

PublishedCachesServiceResolver.Current = 
    new PublishedCachesServiceResolver(publishedCachesService);

Are we ready for production yet? Not quite, obviously.

Interesting times!

There used to be Disqus-powered comments here. They got very little engagement, and I am not a big fan of Disqus. So, comments are gone. If you want to discuss this article, your best bet is to ping me on Mastodon.