Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: Cache Question

  1. #1
    vedran is offline Member
    Join Date
    Jun 2012
    Posts
    98

    Default Cache Question

    Hello,

    I am using version 9.3 and I have question regarding cache.

    we have really lots of products. I have tried to trim procedure as much s I could, but it is still heavy on DB. Imagine if thousand users hit the website... it WILL go down no doubt.

    CacheEntityPageHTML works fine, but something is unclear to me. It seems I cant hold cache longer then several hours.

    What I need to do is to hold it at least for 2 days. This is what I have in app config:

    CacheDurationMinutes - 2880
    CacheEntityPageHTML - true
    CacheMenus - true
    Localization.CurrencyCacheMinutes - 60

    Are these the correct setting? Is there something else that I need to tweak?

    What is the impact using cache, other then updates not showing before reset cache is performed?

    And finally, is there option to build cache automatically at least for certain areas of the site, so to avoid first user bad experience?
    Last edited by vedran; 11-17-2012 at 02:51 PM.

  2. #2
    mmcgeachy is offline Senior Member
    Join Date
    Sep 2008
    Posts
    174

    Default

    Given the settings listed if the cache only lasting a few hours it sounds like the application pool is being reset. HttpContext.Current.Cache is stored in memory so any application pool reset clears the cache. Having the application pool reset very often isn't ideal. Since even the EntityHelpers gets rebuilt then. So I would recommend tweaking the application pool settings.

    As for the impact of using CacheEntityPageHTML the largest noticeable impact is more memory is used. If the amount of memory gets to be an issue you can try saving to a file/disk instead. CommonLogic.FileExists, CommonLogic.ReadFile and CommonLogic.WriteFile are great methods to start with.

    When it comes to build the cache out side of loading the page. There is nothing out of the box that does this. It is however not impossible to make code to do this.