Jump to content

Enable Caching


keat

Recommended Posts

Two main functions: database resultsets and compiled skin templates.

Database queries would number above 100 for most page requests. Given that most functions on the storefront (product, category, documents, images, navigation, users) does not change the query of the results, the strategy is to cache the database results to a local file (or memory, or some other technique).

Reading results from a local file may or may not be faster than fetching results from the database. It depends on the load on the shared database server and where that server is physically located.

Every time I have profiled CubeCart's processes (XDEBUG), it is Smarty that consistently consumes the vast bulk of the time. Even after caching a compiled template, Smarty still burns through the milliseconds populating the template with the data.

Link to comment
Share on other sites

19 hours ago, bsmither said:

Reading results from a local file may or may not be faster than fetching results from the database. It depends on the load on the shared database server and where that server is physically located.

It is true that the overall speed of a website is affected by a large number of different factors and some can have a lot more of an impact than others - however, there is never any reason (outside of development changes to skins perhaps) to ever not have caching switched on !  File based will always be quicker than having caching turned off and the differences can be more pronounced at times when the MySQL server process is being more heavily used.  Best bet is to find a hosting company that allows you to use memcached (as we do :D) as this is considerable quicker than file based caching.

Link to comment
Share on other sites

I have my own dedicated server, so might look in to memchached.

Incidentally, caching was not the cause of my initial problem, as the problem re-ocurred with caching disabled.

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...