Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom caching in ASP.NET
    text
    copied!<p>I want to cache custom data in an ASP.NET application. I am putting lots of data into it, such as List&lt;objects>, and other objects.</p> <p>Is there a best practice for this? Since if I use a static data, if the <code>w3p.exe</code> dies or gets recycled, the cache will need to be filled again.</p> <p>The database is also getting updated by other applications, so a thread would be needed to make sure it is on the latest data.</p> <h3>Update 1:</h3> <p>Just found this, which problably helps me</p> <p><a href="http://www.codeproject.com/KB/web-cache/cachemanagementinaspnet.aspx?fid=229034&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=2818135#xx2818135xx" rel="nofollow noreferrer">http://www.codeproject.com/KB/web-cache/cachemanagementinaspnet.aspx?fid=229034&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=2818135#xx2818135xx</a></p> <h3>Update 2:</h3> <p>I am using DotNetNuke as the application, ( :( ). I have enabled persistent caching and now the whole application feels slugish. </p> <p></p> <p>Such as a Multiview takes about 3 seconds to swap view.... </p> <h3>Update 3:</h3> <p><a href="https://stackoverflow.com/questions/115126/strategies-for-caching-on-the-web">Strategies for Caching on the Web?</a></p> <p>Linked to this, I am using the DotNetNuke caching method, which in turn uses the ASP.NET <code>Cache</code> object, it also has file based caching.</p> <p>I have a helper:</p> <pre><code>CachingProvider.Instance().Add( _ (label &amp; "|") + key, _ newObject, _ Nothing, _ Cache.NoAbsoluteExpiration, _ Cache.NoSlidingExpiration, _ CacheItemPriority.NotRemovable, _ Nothing) </code></pre> <p>Which runs that to add the objects to the cache, is this correct? As I want to keep it cached as long as possible. I have a thread which runs every x Minutes, which will update the cache. But I have noticied, the cache is getting emptied, I check for an object "CacheFilled" in the cache. </p> <p>As a test I've told the worker process not to recycle, etc., but still it seems to clear out the cache. I have also changed the DotNetNuke settings from "heavy" to "light" but think that is for module caching.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload