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
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.
- There is an impressive number of "FIXME" comments in the code, that need to be taken care of: questions, performance optimizations, locking strategies, small issues...
- At the moment, the cache reloads the entire content from database when the application (re)starts—currently experimenting on solutions to speed that up (à la