Caching.. where, what, how?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 years ago
Could someone please point me to some information on how and if NOP caches data?

Doing some basic profiing Im seeing a crazy number of SQL queries on pages and on second hits of pages it doesnt seem to be much better.

That said second hits of pages do get served much quicker. The issue I have is that even though I have my app pool set to not recycle, if I leave the app for a period of time (say 30 mins), th epage goes back to a first hit 15 seconds loading time.

I want whatever is cached to stay there indefinately, how can I set this please?

Thanks
10 years ago
Does anyone actually read these? Please help even if its only a 2 second tip as to where to look, speed is so crucial to the app.
Thanks
10 years ago
Hi JohnDillon,

This is probably of no use to you whatsoever, however
http://developer.yahoo.com/performance/rules.html

Browsers (and proxies) use a cache to reduce the number and size of HTTP requests, making web pages load faster. A web server uses the Expires header in the HTTP response to tell the client how long a component can be cached. This is a far future Expires header, telling the browser that this response won't be stale until April 15, 2010.

Add an Expires or a Cache-Control Header
tag: server
There are two aspects to this rule:
For static components: implement "Never expire" policy by setting far future Expires header
For dynamic components: use an appropriate Cache-Control header to help the browser with conditional requests

If you find any performance optimisations please share them, my nopcommerce sites are being shutdown due to excessive use of resources.

I am trying CloudFlare as well to see if it speeds things up a little
10 years ago
If your site get slow after 30 minutes of inactivity.. you can use a free ping service to keep it in memory.. http://www.pingalive.com/
10 years ago
Thanks but the question is why is it so slow in the first place? A first load of a webpage should not take 15 seconds, especially in ecommerce.
I really dont want to criticise the developers of this app because in so many ways its fantastic, and they clearly put lots of hard work into it. I just must be missing something to see why a system would be designed to be so dependant on so many database calls per page? EF to me seems like such an inefficient animal.
10 years ago
johndillon wrote:
Thanks but the question is why is it so slow in the first place? A first load of a webpage should not take 15 seconds, especially in ecommerce.
I really dont want to criticise the developers of this app because in so many ways its fantastic, and they clearly put lots of hard work into it. I just must be missing something to see why a system would be designed to be so dependant on so many database calls per page? EF to me seems like such an inefficient animal.


Its slow on the first load, because the application binaries are being loaded into appdomain. I advise you to go through some of these posts on stackoverflow to understand it.
10 years ago
jariwalakrunal wrote:
Thanks but the question is why is it so slow in the first place? A first load of a webpage should not take 15 seconds, especially in ecommerce.
I really dont want to criticise the developers of this app because in so many ways its fantastic, and they clearly put lots of hard work into it. I just must be missing something to see why a system would be designed to be so dependant on so many database calls per page? EF to me seems like such an inefficient animal.

Its slow on the first load, because the application binaries are being loaded into appdomain. I advise you to go through some of these posts on stackoverflow to understand it.

No I am not talking about when the applicaiton starts, I am talking about when the application is running and a page is requested for the first time. So for example I am request the homepage, then I go to a category page. The catgory page takes a long time to load and based on what I can see in Sql profiler makes lots of requests to sql.
10 years ago
johndillon wrote:

No I am not talking about when the applicaiton starts, I am talking about when the application is running and a page is requested for the first time. So for example I am request the homepage, then I go to a category page. The catgory page takes a long time to load and based on what I can see in Sql profiler makes lots of requests to sql.


In that case Yes, its a lot of queries. And if you have multiple languages configured, it will make few more queries. However, once its requested it will be cached.

What happens if you browse the another category? Is it taking same time to load?
10 years ago
No its not as long no, things gradually build up in cache I appreciate that, the problem is that even though I have my applicationpool never to recycle if I then leave the site for 30 mins and come back its slow again, so clearly the cache is being deleted.
I realise I can use somethign like pingwatch but this means I need to setup all category and product pages, just pinging the homepage wont work. This is not realistic.

What I want to be able to do is set tha the cache NEVER expires. IF I have this, combined with application pools not to recycle the once its in memory its going to be fast. Resources are not an issues its on its own server with SSDs etc...

Do you know where I can configure the cache to store items indefinately please?
10 years ago
johndillon wrote:
No its not as long no, things gradually build up in cache I appreciate that, the problem is that even though I have my applicationpool never to recycle if I then leave the site for 30 mins and come back its slow again, so clearly the cache is being deleted.
I realise I can use somethign like pingwatch but this means I need to setup all category and product pages, just pinging the homepage wont work. This is not realistic.

What I want to be able to do is set tha the cache NEVER expires. IF I have this, combined with application pools not to recycle the once its in memory its going to be fast. Resources are not an issues its on its own server with SSDs etc...

Do you know where I can configure the cache to store items indefinately please?


If you have enough memory then it should not be an issue. nopCommerce rebuild caching at some schedule task. You need to have a look at it.

Moreover, you can set application pool to never recycle or set it may be every 24 hours.

Moreover, you ping home page, one category page, one product detail page. This should work fine.

Moreover, do you see any real improvement with SSD?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.