Output Cache Module in Orchard CMS
I've been discovering more and more features in Orchard CMS 1.7 and blogging about them within Orchard CMS Tutorials. As I browsed the Orchard Modules in the Orchard 1.7 source code I noticed a new module under Performance, called Output Cache Module, which sat next to SysCache Module. This sounded very similar to the Contrib.Cache Module that I have been using for additional performance in Orchard CMS for quite some time, and guess what, they are the same! Contrib.Cache is now the Output Cache Module and has been added directly to Orchard 1.7!
Orchard CMS Performance
I can't help but get a bit nostalgic about Orchard Performance since the days of Orchard CMS 1.0. I wrote several Orchard tutorials on how to improve both the startup performance of Orchard as well as the runtime performance. I'm not going to link to all the tutorials as some are a bit outdated now and on websites I am about to retire, but topics included:
- Orchard Warmup Module for Startup Performance
- Orchard Keep Alive Module for Shared Hosting Performance
- Orchard CMS and Application Pool Idle Timeout Settings
- Using ICacheManager to Cache within Orchard Modules
- Continued Bug Fixes and Enhancement in each version of Orchard
Performance continues to be and will always be a priority within Orchard CMS. One topic I hadn't mentioned, and will mention right now, is the new Output Cache Module in Orchard CMS 1.7, which used to be called Contrib.Cache!
Output Cache Module, a.k.a. Contrib.Cache Module
Output caching is an incredible performance benefit on ASP.NET Websites, and I have been using the Contrib.Cache Module for quite some time on my Orchard Websites for output caching. Output caching short circuits the HTTP request for a page, such that it saves the rendered version of a page and displays this cached version to the user for a certain period of time. In the case of Orchard CMS, this means an ASP.NET MVC controller, services, and databases are not processing the request for that page, freeing them to do other things. This increases both the performance and the scalability of your Orchard website. At some point the output cache is invalidated and a fresh version of the page is rendered, saved to the cache, and displayed to the user for a certain period of time. This process continues over and over again, providing you a noticeable improvement in performance.
Contrib.Cache was not a part of Orchard CMS, however. It had to be installed and downloaded separately as other 3rd party modules. However, with Orchard CMS 1.7, Contrib.Cache is now called the Output Cache Module and it is included in the Orchard CMS 1.7 source code. If you are not working with the source code, you may have to download it separately from the Orchard Gallery. We won't know until Orchard CMS 1.7 is officially released.
I recommend you download, install, and configure the Output Cache Module for use in all your Orchard Websites. In most cases you will have to do none to very little configuration to see an immediate performance bump in your Orchard Website. By default the Ouput Cache Module will cache your pages for 5 minutes, giving you the ability to change the setting, ignore certain URL's, and provide client-side caching headers for proxies, etc. at your whim.
In addition to providing various configuration settings for caching, you will also be able to view various caching statistics to see when a page has been cached and how much longer it will be cached before a new version is rendered and re-stored in the cache!
In addition to the Output Cache Module, there are many performance improvements being added to Orchard 1.7. I'll have more on this topic when Orchard 1.7 is released!
Check out other Orchard Tutorials on Orchard 1.7:
- Extending Orchard Workflows with Custom Activities
- Run Orchard Recipes from Orchard Dashboard in Orchard CMS 1.7
- Media Manager and Image Editor in Orchard CMS 1.7
- Orchard Workflow Module in Orchard 1.7
- Content Picker has Content Type Filtering in Orchard CMS 1.7
- Shape Link for Orchard Menus in Orchard 1.7
- Orchard Content Type Layer Rule in Orchard CMS 1.7