Skip to main content

Posts

Showing posts with the label caching

Sitecore.Caching.Generics.CustomCache - Sitecore Caching Updates

 The Problem If you are involved in an upgrade project where you were still on an older version of Sitecore like 8.2 and have a personalized cache implementation relying on Sitecore CustomCache, it is possible that you are utilizing the Sitecore.Caching.CacheManager.FindCacheByName(string name) method. This particular method assists in retrieving a cache object based on the cache name (key). You may encounter issues with the FindCacheByName(string name) method no longer functioning, which is a result of the modifications Sitecore has made in implementing cache logics. The Analysis Sitecore has implemented generics within its site caching framework. Further details can be found at the following link:  https://doc.sitecore.com/xp/en/developers/82/sitecore-experience-platform/cache-api-changes.html#changes-in-the-cachemanager-class.  As a result of this update, when utilizing the FindCacheByName() method, it is necessary to indicate the type of key, as demonstrated in the ex...

Sitecore Cache Key Indexing - What is it?

Sitecore continuously introduces new concepts and mechanisms. Many developers easily miss to fully appreciate the advantages of these hidden features until they accidentally come across them. This blog post focuses on Cache key indexing, a discovery I made while investigating cache optimization techniques. Premise If you have a website or a multi-site that is of considerable size, such as having numerous articles or a vast directory of individuals from your company, incorporating a variety of components with distinct templates, languages, and versions can be beneficial. Additionally, introducing elements that are constantly changing, copied, or deleted is a common practice.  If you are using Azure and find this scenario relatable, utilizing cache key indexing can potentially address any performance issues that your site may encounter. What is Cache key indexing? Cache key indexing offers a valuable solution in optimizing the performance of operations on a sizable cache. This techni...

Using Dianoga's async image optimization on CDN

Dianoga is an automatic image optimizer for the Sitecore media library. It reduces the size of your images served from Sitecore by 8-70% automatically.  Dianoga is great for situations where content editors may not be image editing experts. How Dianoga works? By default, Dianoga runs asynchronously after the image is saved into the media cache. This means it has practically no effect on the site's frontend performance (though it does use some CPU time in the background). Dianoga updates the cache after the first image request. This means the first hit to images will serve the unoptimized version of image. Subsequent requests will receive the optimized version from cache. Where is the problem? Dianoga's behavior of serving unoptimized images on first request creates problem while using CDNs. CDNs cache the responses of media requests. Since first hit to images serve unoptimized image, CDN will cache the unoptimized version. CDN will serve this unoptimized version of image in it...

Sitecore Cache Tuning

High performance for any digital platform is elementary. In this post, I will address some basics around Sitecore caching and some best practices that Sitecore developers/architects can follow to boost the performance of Sitecore solution. While working with one of our clients, content authors started complaining about the page load time in experience editor. The environment was Azure IaaS. So, we started looking at all the performance tweaks we could apply. Sitecore Cache Tuning Performance and cache go hand-in-hand :D  So first thing we wanted to explore was Sitecore caching especially the cache sizes.  I assume the readers are already aware about Sitecore caches and  how to configure them . We used the showconfig.aspx (https://<my sitecore hostname>/sitecore/admin/showconfig.aspx ) and looked especially for Sitecore's prefetch, items and data cache sizes. So, how do we  know if the cache sizes are sufficient for our application? First, you need to open Cache...