nopCommerce 1.7 cache not working?! Possible solution to 1.7 slowness?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
FUZION wrote:
snip


little confused as to what your suggestion is for a solution?

Comparing Facebook to an opensource ecommerce project is a bit like apples and oranges.

We need something which is simple and not overly complicated and most importantly easily extended.
13 years ago
FUZION wrote:

Telling the static part of the product object that it needs to live by the same rules as the dynamic part, particularly when the payload of the bulk of the product data is so huge compared to the dynamic price and inventory data is just crazy talk (my opinion of course :)


So we only hit the database for the dynamic properties of an object. Sounds brilliant! So what's your proposed solution?? :)

It seems the easiest way would be to apply output caching to the "non-dynamic" user controls.

Don't get me wrong, your comments are valid but we are getting away from the fact that we want to cache our domain objects for longer than a single http request and currently we can't. For me, that is the bigger issue here. Output caching will help but isn't going to fix everything.

P.S. There's nothing stopping us from eager loading data rather than submitting so many queries to the database.
13 years ago
nopCommerce team | retroviz wrote:
snip


output cache is quicker than object cache from my experience as the whole http request is cached.


I actually implemented SQL Cache dependency on a test nop site and that worked well with output cache.
13 years ago
Was this pre 1.7?
13 years ago
nopCommerce team | retroviz wrote:
Was this pre 1.7?


no, it was on 1.7.

It wasn't anything magical though (i.e I just to a rush job to see how it performed)

Basically using the polling method I set up cache dependency on products  / categories and mapping tables.

Then in my modules/controls i added

<%@ OutputCache SqlDependency = "Nop_Product,Nop_Categoy " Duration="9999999" VaryByParam="*"  %>

Page load was reduced by half.

I set my poll time to 4 seconds.

The other thing which is nice with this method is it can be used with clustered hosting solutions as the cache doesn't get stale between nodes.
13 years ago
SQL Dependency Cache is also where we are heading with most of the patches we are doing (I'd pay someone to consult with me on this by the way...)

I'm half tempted to just throw the non-price, non-inventory product objects in the application memory space and hard cache them there.

My other alternative is to deserialize the product object into an XML blob and then shove it into an extra XML field in the nop_product table.

I'm also chasing down why loading a product detail page causes the LoadCategorybyID proc to fire hundreds of times.  Unlike most catalogs where a product fits in a nice tidy category somewhere, my single product with 21 product variants can be classified in over 500 categories depending on the situation.

When the product detail page is loading it's hydrating the "complete" product object which means it's firing off zillions of individual, atomic "get category" procs.  Why?  to assemble the breadcrumbs that actually only needs to know the name and ID number of 4 to 5 categories.  That's just one case where the monolithic "get everything we know about this product" is just overkill... and when you multiply that times a bunch of products and variants it gets messy.

I think I need a streamlined "get only what I need to know about this product to show a product detail page" object...

I'll post what I come up with.

Jared Nielsen
13 years ago
The other option....

Using Lucene.net create an index of your catelog and only query this.

When a product / catelog is update update the index. I.E there are no database calls on the front end.

A friend of mind has already done the leg work on this.

I have the done a lucene.net search on http://www.shortersclub.co.uk/search.aspx?searchterms=haribo

This would be a solution to all our problems?

What possible issues could there be?
13 years ago
FUZION wrote:
"nopCommerce is an application"

So is Facebook, but I can guarantee you that aside from the asynchronous AJAX callbacks when you post an update, 100% of that website is publication cached content.


I don't know about Facebook but Wikipedia uses Memcached. Not a suggestion or anything just a point of information!
13 years ago
thought wrote:
The other option....

Using Lucene.net create an index of your catelog and only query this.

When a product / catelog is update update the index. I.E there are no database calls on the front end.

A friend of mind has already done the leg work on this.

I have the done a lucene.net search on http://www.shortersclub.co.uk/search.aspx?searchterms=haribo

This would be a solution to all our problems?

What possible issues could there be?


+1 for lucene.

We would need to have separate services for the UI and administration (talk to database directly in admin). Of course you could use the .net cache in the same way (and this would resolve the problems we have experienced up to now with EF and caching).

I believe Magento works in a similar way.
13 years ago
nopCommerce team | retroviz wrote:
The other option....

Using Lucene.net create an index of your catelog and only query this.

When a product / catelog is update update the index. I.E there are no database calls on the front end.

A friend of mind has already done the leg work on this.

I have the done a lucene.net search on http://www.shortersclub.co.uk/search.aspx?searchterms=haribo

This would be a solution to all our problems?

What possible issues could there be?

+1 for lucene.

We would need to have separate services for the UI and administration (talk to database directly in admin). Of course you could use the .net cache in the same way (and this would resolve the problems we have experienced up to now with EF and caching).

I believe Magento works in a similar way.


I'll see if I can get something working over the weekend.

The other nice thing about using lucene is ease of facet searching and creating facets from your catalogue
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.