Jump to content

CC6 Cache clears too often


Michaeljm

Recommended Posts

I have some problems with the CC6 cache.

Every time a customer place something in the basket , every time a customer logs in or out , in fact every time a customer switches page or category, then the client session updates and the cache clears.

The logs shows that almost at every page-shift the cache clears, and then use a lot of power to fill it again ... only for it to be emptied by next page view.

Try look at: classes/database.class.php : about line: 197, 366, 747, (CubeCart version 6.0.6) all lines where it calls : 
Cache::getInstance()->clear('SQL');
That command empty the the cache.

My question is why does it clear the cache that often? Is is possible to fix so the cache can be used with maximum outcome? It this on the to do list for further versions?

Thanks,

 

 

Link to comment
Share on other sites

There was a third-party mod that was egregious in its clearing of the cache for some silly reasons.

Other than that, I know the SQL cache is cleared when the admin does anything anywhere, and whenever the database records any new information (the UPDATE and DELETE commands if any records were affected, and the INSERT command). An exception is when CubeCart/PHP is shutting down (after having delivered the page), CubeCart records the cookie-based session info.

I see where, once a customer has triggered the existence of the 'basket', CubeCart saves the contents of the basket (comprising items, shipping costs, addresses, coupons, taxes, etc) very frequently, and in so doing, clears the cache each time.

I will agree that queries and the cache efficiency can still be greatly improved. (You may have missed the CC5 beta series.)

Link to comment
Share on other sites

Thanks for your reply.

Is this on the todo list in the development of cubecart6 in the near future(to improve the cache, speed of pages evt.)? I like cubecart and would not like to migrate to a other shop for now - but in my continuing growing store I can be forced to take action on this in the future.

Link to comment
Share on other sites

Hey, I'm the one that told Michael about the cache-flushing in his shop.

I was not totally correct, it does not flush the cache on every page-load when updating the session, I mistook that. But however, it still flushes every time a user views a product, and counts up a view.

While looking into CubeCart6, it seems to me that the caching system it built wrong, more like a last-minute fix, hashing and caching at SQL-level, instead of controlling the cached element more precise within the logic of the store. Like only deleting cache-elements affected by an update.

It is not a drop-in easy fix. :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...