Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,944
    Plugin Contributions
    96

    Default Database caching?

    I've got a client running a highly-customized Zen Cart v1.5.1 that recently transferred to bluehost (yes, I know ...) on PHP 5.4.43 and just ran into the weirdest thing:

    I go to one of the configuration screens and change the first value in the list. Upon clicking the "Update" button, I'm returned to the overall configuration display ... but the value hasn't been changed. I can click the next item in the configuration screen and, like magic, the change I made to the first item now displays! This is using the built-in configuration handling in the Zen Cart admin.

    I've checked the configure.php files to ensure that all the file-paths are proper (they are) and the Configuration->Sessions to make sure that the session-save-directory is the /cache folder (it is).

    There are other bits of funkiness going on on this site after the move, but I believe that the above issue is a large, underlying factor.

    I'd appreciate any/all clues or other pieces of information to hunt up.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Database caching?

    As you know
    Zen Cart v1.5.1 is compatible with PHP 5.2.14 thru PHP 5.3.x.
    This is a place to start
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,944
    Plugin Contributions
    96

    Default Re: Database caching?

    Yes, the site's been kept up with the various changes so that's not it.

    Edit: There was no issue when the site was on its previous host, also running a later version of PHP 5.4.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,944
    Plugin Contributions
    96

    Default Re: Database caching?

    Arggh. Discussing the issue with the client, bluehost apparently offered them a "performance improvement" if they configured the site to act as a CDN. Working now to remove remnants of that change; it certainly would explain all the funnies I was seeing on the site.

  5. #5
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Database caching?

    Quote Originally Posted by lat9 View Post
    Arggh. Discussing the issue with the client, bluehost apparently offered them a "performance improvement" if they configured the site to act as a CDN. Working now to remove remnants of that change; it certainly would explain all the funnies I was seeing on the site.
    CDN's a generally a good thing - and yes, they can/do offer some *huge* performance benefits. I recommend using a CDN whenever possible.

    Yup, there can be downsides to them - Especially during any development work (and various other changes) due to the delay caching affect, but of the few CDN services we use, they've all had a 'development' mode that temporarily bypasses the caching, and they'll all had an option to clear the cache contents - individual files, folders, or the entire site.

    Just my 2cents worth,

    Cheers
    RodG

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,944
    Plugin Contributions
    96

    Default Re: Database caching?

    Thanks, RodG. The site in question is pretty dynamic (products added quite frequently). The client called bluehost yesterday to have them really (unlike the last time they called) turn off the CDN and now the admin and store appear to be working "better"!

  7. #7
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Database caching?

    Quote Originally Posted by lat9 View Post
    Thanks, RodG. The site in question is pretty dynamic (products added quite frequently). The client called bluehost yesterday to have them really (unlike the last time they called) turn off the CDN and now the admin and store appear to be working "better"!
    If by 'better' you mean it loads faster, I can only think of one instance where this could be the case, and this is if the store itself is hosted in Australia, and the CDN provider doesn't have a server over here.

    CDN's improve performance in two ways.

    1) They have multiple servers across the globe - So far less demand is placed on the host server.
    2) They use a routing/addressing technology that serves the CDN content from the server in the closest proximity to the client.

    Adding *new* products isn't a concern because dynamic pages aren't cached so these will be found from the moment they are activated. The *images* for the product will be automatically cached when viewed by the first customer, leading to better performance for other customers.

    The only problems I've had with CDN's is where any *static* content needs to be changed. On a ZenCart site these are generally only going to be the images, and the .css content.

    Even the images aren't a problem if the change involves replacing existing images with new ones. The problem only arises if the image(s) are *altered* and the original name is kept. It can take a while (sometimes what seems like eternity) before the CDN's realise that their cached copy is now different from the master copy. This is also compounded because each of the CDN servers have their own cached copy.

    IOW, a CDN should never cause performance issues. Theory dictates that they can only improve performance.

    Of course, I'm making an assumption here that your 'better' is relating to performance (time it takes a page to load) rather than any other issues that you may have found.

    BTW, I'm not basing my comments about performance improvements based on personal observations and/or anecdotal evidence. The effect is quite measurable. Although there are many sites that will test site performance, the one I predominately use is www.webpagetest.org.

    Having said that, on a smallish site with few images there aren't many gains to be made. On a site with 1000's of images the difference can be quite dramatic.

    Oh, yeah, they can also save on a lot of bandwidth too - I've just 'grabbed' this from one of the CDN's we use for one of our busiests sites:
    In the last 7 days 33.09 GB saved
    46.23 GB total bandwidth

    Not an insignificant saving eh?

    Cheers
    Rod.
    Last edited by RodG; 22 Nov 2015 at 08:05 AM.

  8. #8
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Database caching?

    Quote Originally Posted by lat9
    they configured the site to act as a CDN
    Glad you discovered this - dynamic sites do not play well with cloud services
    Zen-Venom Get Bitten

  9. #9
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Database caching?

    Quote Originally Posted by kobra View Post
    Glad you discovered this - dynamic sites do not play well with cloud services
    Kobra! You should be ashamed of yourself for making such a simplistic comment such as this.

    You/We could also say the *exact* same thing about the caching provided by all web browsers as well as all proxy servers that are implemented (often transparently) by almost every ISP on the planet.

    A CDN is just another cache, and like all caches, they only cache static content.

    Name:  Screenshot from 2015-11-23 13:34:11.jpg
Views: 208
Size:  37.6 KB


    Name:  Screenshot from 2015-11-23 13:36:27.jpg
Views: 205
Size:  40.1 KB



    This very busy ZenCart site appears to be playing very nicely with the CDN. As can be clearly seen, the bulk of the content on this dynamic site are the static images. The bandwidth saved and performance gained (by not having to server the requests from the master/host server are clearly quite significant.

    In what way can this be considered as 'not playing well'?

    Cheers
    RodG

 

 

Similar Threads

  1. Caching Issues
    By blazarus in forum General Questions
    Replies: 4
    Last Post: 25 May 2011, 03:20 AM
  2. images caching?
    By Muzz in forum General Questions
    Replies: 1
    Last Post: 23 Sep 2010, 07:26 AM
  3. How to control caching
    By pinne in forum Basic Configuration
    Replies: 0
    Last Post: 27 Jul 2008, 07:16 PM
  4. File caching
    By inlikeflin in forum General Questions
    Replies: 7
    Last Post: 19 Jan 2008, 03:08 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