April 05, 2016

When Memory Caching Doesn't Mean Memory

For a number of years I have been providing guidance on how to get the best performance from DNN. One of my key recommendations is to change the caching mode to "Memory" from the default setting of "File." The setting change itself is quick and harmless, simply change the value in Host Settings are you are done. Well, come to find out it isn't exactly that easy.

What Can Happen

Making this change alone is one of the best performance improvements you can get from the platform. However, as I have recently learned, it isn't quite as simple as changing the setting. In a situation with a very large client site on Azure, they were experiencing application recycles due to the file activity being created by the File caching method. We had changed the setting to Memory, however, files were still being written to the cache. Come to find out, many items had explicitly set items.

The Fix?

Come to find out a number of items have the cache setting explicitly configured at installation and need to be updated. The fix is as simple as running the following SQL Query. REMEMBER: backup your database before making any changes.

UPDATE TabModules
SET CacheMethod = 'MemoryModuleCachingProvider'
WHERE CacheMethod = 'FileModuleCachingProvider'


After you make the above change you will need to recycle the application and should see even more performance improvement than by changing the setting alone!.

tags: DNN, DNN Development, Performance
comments powered by Disqus

Content provided in this blog is provided "AS-IS" and the information should be used at your own discretion.  The thoughts and opinions expressed are the personal thoughts of Mitchel Sellers and do not reflect the opinions of his employer.

Content Copyright

Content in this blog is copyright protected.  Re-publishing on other websites is allowed as long as proper credit and backlink to the article is provided.  Any other re-publishing or distribution of this content is prohibited without written permission from Mitchel Sellers.