ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

[URGENT]Expression Engine Caching for my setup is failing. Please help!

January 18, 2012 1:44am

Subscribe [2]
  • #1 / Jan 18, 2012 1:44am

    dgink

    60 posts

    When I turn cache on at the tag level using these parameters:

    {exp:channel:entries channel="blog" limit="25" disable="category_field|trackbacks|comments" dynamic="off" require_entry="yes" orderby="date" sort="desc" cache="yes" refresh="10"}

    My page loading comes to a stand still and takes 30 seconds to load the 43 queries happening on my blog template. Without the cache, it just take 3-5 seconds. I want to speed this up using caching. So what is happening is turning cache on is making things worse even on repeated page loads.

    See the live cached template here: http://bit.ly/yxWBm6

    I am using an advanced setup and therefore have updated the path correctly to my cache folder in my config.php file.

    I have checked with my system administrator. We have full server control and the file permissions are set correctly to 777. A folder called tag_cache is generated and the files within that folder also have 777 permissions.

    We also tried moving the cache folder from the system folder to the root folder of the website and also tried moving it outside the root just to check. In these scenarios, I face the same delay in loading + the tag_cache folder is not created even after paths have been updated.

    Here is my setup details:
    My EE version is 2.3.1 Build 20111017
    Browser Chrome 15.0.874.121
    Platform Mac OS X
    Running Apache/2.2.3 (CentOS) not windows
    MySQL 5.5.14
    PHP Version 5.3.3

  • #2 / Jan 18, 2012 2:45am

    Adrienne L. Travis

    213 posts

    There are warnings in the EE docs about this. Tag caching is often a really bad idea, especially on higher-traffic sites, because it caches to the filesystem. Depending on your server configuration, it is ABSOLUTELY possible that filesystem I/O is a bigger bottleneck than database I/O.

    Here’s a quick rundown of caching concepts: http://eeinsider.com/articles/using-cache-wisely-with-expressionengine/

    In your situation, it sounds like you have a pretty simple solution: turn off tag caching. It’s not speeding things up!

    If you need caching, use dynamic query caching (if you’re not using pagination, future entries, or random entries—dynamic query caching is NOT workable if you use any of those features). Or use full template caching (CacheCracker makes that easier and safer: http://devot-ee.com/add-ons/cachecracker), but that’s still using filesystem I/O, so may not gain you anything. And/or use CE Cache (http://devot-ee.com/add-ons/ce-cache) to cache to APC or Memcached—if you’re in a really high-traffic environment, this is absolutely the way to go.

  • #3 / Jan 19, 2012 6:07pm

    Dan Decker

    7338 posts

    Hi dgink,

    I’m sorry to see that tag caching is giving you undesirable results. Caching with ExpressionEngine can be fairly complex, as you have seen. I’ll echo Adrienne’s suggestion that you turn it off in this instance, as you are not gaining anything from it. All the resources above should get you going in the right direction.

    Let me know if I can answer any more questions for you.

    Cheers!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases