c# - HttpRuntime Cache stopped working -


i using httpruntime cache run piece of code every 30mins. site hosted in shared environment. working fine until last week. no code changed, stopped working.

other "application started" email, haven't received other email. suggestion on how find issue?

thanks.

    void application_start(object sender, eventargs e)     {         registercache();         sendemail("application started");     }      private void registercache()     {         try         {             httpruntime.cache.add("dummy", "dummy", null, datetime.utcnow.addminutes(30),                                cache.noslidingexpiration, cacheitempriority.notremovable,                                new cacheitemremovedcallback(oncacheitemremoved));         }         catch (exception ex)         {              sendemail(ex.message);         }     }      public void oncacheitemremoved(string key, object value, cacheitemremovedreason reason)     {         try         {             registercache();             // ... data interweb, email data...         }         catch (exception ex)         {             sendemail(ex.message);         }                 {             sendemail("cache item removed");         }     }      void application_end(object sender, eventargs e)     {         sendemail("application ended");     } 

one possible cause idle timeout setting in iis application pool. default set 20 minutes. cause website "shut down" , cache removed event not fire.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -