Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • shinsuke nakayama 109 posts 250 karma points
    Aug 25, 2015 @ 01:58
    shinsuke nakayama
    0

    System.Runtime.Caching,MemoeryCache Issue

    Hi guys,

    I have a following code and i can't seems to work out whats wrong and why.

        private static MemoryCache _cache = new MemoryCache("CacheManager");
    
        public static bool IsNavigationCacheEmpty()
        {
            return !_cache.Contains("ProductChannelItem");
        }
    

    And when i call IsNavigationCacheEmpty() method, it works fine if the controller is inherited from

    Umbraco.Web.Mvc.RenderMvcController

    but if it inherits from normal controller, it always return null

    System.Web.Mvc.Controller

    In Summary cache set under Umbraco Controller can't be detected by normal Controller, tho its running under the same website / application pool.

    Also this only seems to happen in our Windows 2008 R2 server, works fine on Windows 8.1 dev machine

    Any of you guys had this issue? or know why this could occur?

    Currently web site is running under .net 4.5.1

    Thank you

    Shinsuke

Please Sign in or register to post replies

Write your reply to:

Draft