Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: SQL_CACHE_METHOD What is it?

    Quote Originally Posted by philip937 View Post
    SQL_CACHE_METHOD What is it? ... If set to database or file, what exactly is it and what is the reason for using it? ... Are there disadvantages to using it?
    There is a fairly straightforward answer in configure.php file contents explained.

    Quote Originally Posted by philip937 View Post
    I have searhed about and seen explainations on how to set it and that one goes to the database and one goes to the file but not what it is actually used for, its purpose?
    A quick web search on the word "cache" provides a number of explanations for what a cache is and why you might use one. Here is one such article from Microsoft.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  2. #2
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: SQL_CACHE_METHOD What is it?

    Quote Originally Posted by lhungil View Post
    There is a fairly straightforward answer in configure.php file contents explained.


    A quick web search on the word "cache" provides a number of explanations for what a cache is and why you might use one. Here is one such article from Microsoft.
    I already read that configure.php contents page, its doesnt answer my question.

    I know what Cache is, and what it is used for, however I want to know what is being cahed to the db or file of the setting in the configure.php file is set.set and for what purpose/benefits/disadvantages.
    Phil Rogers
    A problem shared is a problem solved.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: SQL_CACHE_METHOD What is it?

    Some SQL queries for your store may be cached for ... well, for the reasons you said you already understand.

    Setting it to 'none' effectively disables the caching.
    Setting it to 'file' is ... well ... obsolete since v1.5.0.
    Setting it to 'database' causes the preprocessed sql query results to be stored so a single lookup will retrieve the data instead of having to make the database go out and collect all the info for some complex queries again. This gives some performance gain.
    While it may seem odd to cache database results to the database, the purpose is mainly for minimizing delays with complex lookups or very high-traffic lookups. But, that's what caching is all about, as you know.

    If your server is very well tuned, then you might get a small increase in performance by enabling the caching (as I said earlier, the only valid option is 'none' or 'database').
    If your server is already struggling to perform well at the database level, caching to database will not be beneficial and you should really look at improving your server configuration.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: SQL_CACHE_METHOD What is it?

    Thanks Doc.

    is it any queries that are cahed or only ZenCart core file queries. i.e would queires carried out my mods be included?

    Also can caching cause issues? is it only caching the look up statements or does it cache the results? if changes are made to the catalougue would cache need to be reset to ensure current results are shown etc?
    Phil Rogers
    A problem shared is a problem solved.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: SQL_CACHE_METHOD What is it?

    It only caches a select few core queries. Not addons.
    And only reads, not writes.
    And the system already does any cache cleanup needed whenever any cached data is changed, so integrity is always preserved.

    If your question is still about performance, the addition of the query_cache code in 1.5.1 almost invalidates the need for the older legacy caching. I would venture to say that you would find little gain by enabling SQL_CACHE_METHOD if query_cache is enabled.

    And, as I said earlier, if your server's database is sluggish at all, then that's what you should be tuning, not the caching settings in Zen Cart.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: SQL_CACHE_METHOD What is it?

    I dont have any problems and have never needed to enable it.. Just edjamucating myself
    Phil Rogers
    A problem shared is a problem solved.

  7. #7
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: SQL_CACHE_METHOD What is it?

    Although I did once bring this up before, the only time I ever had a problem is when someone was purposly adding hundreds if not thousends of products in the cart. this seem to create exponetial queries on the database on every page load the more products that were in the cart to the point of the site no longer responding. I guess the only way to tackle that is to put a limit on the max server queries per user?
    Phil Rogers
    A problem shared is a problem solved.

  8. #8
    Join Date
    May 2007
    Location
    Virginia, USA
    Posts
    101
    Plugin Contributions
    0

    Default Re: SQL_CACHE_METHOD What is it?

    Quote Originally Posted by DrByte View Post
    If your server is already struggling to perform well at the database level, caching to database will not be beneficial and you should really look at improving your server configuration.
    Can you give an example of how you would know if the server was struggling to perform well at the database level? I'm not a programmer so I don't know what to look for or what I would be seeing/experiencing.

    Also, what steps would I take - or what should I be asking my host company - to improve the server configuration?

    BTW, the store that lead to this question is using zen cart v1.3.9h and the owner does not want to upgrade. The site is hosted with Hostgator.

    I would like to take these actions if I could get more clarity on exactly what to do.

    Thanks for anything you can share.

 

 

Similar Threads

  1. Replies: 0
    Last Post: 14 Feb 2011, 04:47 PM
  2. Is there any guideline for SQL_CACHE_METHOD?
    By justin2010 in forum General Questions
    Replies: 5
    Last Post: 12 Dec 2010, 02:51 AM
  3. In what file and What line of code outputs Product Description?
    By mk12 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 28 Sep 2009, 09:56 PM
  4. SQL_CACHE_METHOD Benefits?
    By Zean in forum General Questions
    Replies: 3
    Last Post: 5 Aug 2009, 11:49 PM
  5. Stylesheet class...quick list for what's what on the page
    By AllofUs in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Aug 2008, 04:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg