locked
CacheManager.Flush() replacement statement ? RRS feed

  • Question

  • hello all,

    we have been using CacheMangager.Flush() in our application using EntLibrary 5. When we tried to migrate the EntLibrary to 6, we are having issues with using Cachemanger().Flush() since EnterpriseLibraryContainer class is removed from EnterpriseLibrary6.

    Can anyone please suggest any alternate statement that is used for the same purpose ?? or any other solution ?

    Thanks in Advance !


    Nachammai Nachiappan

    Monday, March 5, 2018 4:10 AM

All replies

  • Hi nachammai93,

    Thank you for posting here.

    For your question, CacheManager.Flush Method is outdated and is no longer being maintained. 

    What is the type of your project? ASP.NET?

    If you want to remove cache of web application, you could try to use Cache.Remove Method (String) to remove the specified item from the application's Cache object. 

    If you want to clear the all HttpContext cache items, you can refer to the following link.

    https://forums.asp.net/t/1792625.aspx?HttpContext+Current+Cache

    If your application is not a web application, you could try to use MemoryCache.Trim Method (Int32) to remove a specified percentage of cache entries from the cache object.


    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, March 6, 2018 2:20 AM
  • Hi nachammai93,

    Any update?

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, March 21, 2018 3:00 AM