Custom MVC Control Clear Caching Issue

Posted by martinc@arekibo.com on 25-Jun-2019 17:27

Hi,

Siteinity 11.2 MVC

I have created a Dynamic Module which contain some data. From this data  I generate a list of page that I cache

 CacheManager.Add(
                                cacheKey,
                                menuItems,
                                CacheItemPriority.Normal,
                                null,
                                new AbsoluteTime(DateTime.Now.AddSeconds(duration))
                                );

All works fine. I just want to clear the cache when a user either adds or edits the Module or a Page

I am trying to find where I can execute my code.

 ICacheManager CacheManager = SystemManager.GetCacheManager(CacheManagerInstance.Global);
 CacheManager.Remove("Cache");

I have looked at Caching Dependency

https://www.progress.com/documentation/sitefinity-cms/for-developers-idataevent - The DataEventHandler is been called numerous times when  I edit the module item in the admin area

Any support would be appreciated

Thanks

All Replies

This thread is closed