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.

Caching questions

February 05, 2008 10:56pm

Subscribe [3]
  • #1 / Feb 05, 2008 10:56pm

    Saxi

    108 posts

    I was under the impression that when you use caching, that any changes you make won’t show up right away.  But it appears EE knows to flush the cache when updating templates or entries.  Is this the case or does it just seem that way.  Is there anything that won’t update without flushing the cache when using template caching?  If this is the case, is there any harm in using really high cache values like 24hrs?  I am currently using 2hrs as it seems to flush the cache when I edit a template and entry I didn’t see any reason not to.

    Also, is template caching preferred over mySQL caching?

    Finally is there a way to select where the cache is stored so a ramdisk can be used?

  • #2 / Feb 06, 2008 1:37am

    Kyle Slattery

    109 posts

    To answer your first couple of questions—yes EE auto-flushes your cache when you update/add an entry or edit a template.  You might want to be careful using high values for caches when you have time sensitive material, such as future or expiring entries.  Otherwise, I think you’ll be fine using longer times.

    For your other questions, I’ll have to defer to others 😊.

  • #3 / Feb 06, 2008 1:44am

    Saxi

    108 posts

    To answer your first couple of questions—yes EE auto-flushes your cache when you update/add an entry or edit a template.  You might want to be careful using high values for caches when you have time sensitive material, such as future or expiring entries.  Otherwise, I think you’ll be fine using longer times.

    For your other questions, I’ll have to defer to others 😊.

    As long as the future/expiring entries do not require visibility within the cache time frame it should be fine right?  Like if we use an 8hr cache and we do a future and we don’t care if it takes 1 minute or 8 hours, we should have no problems with a hour cache?

  • #4 / Feb 06, 2008 1:45am

    Kyle Slattery

    109 posts

    As long as the future/expiring entries do not require visibility within the cache time frame it should be fine right?  Like if we use an 8hr cache and we do a future and we don’t care if it takes 1 minute or 8 hours, we should have no problems with a hour cache?

    Right, if the exact time the entry appears/disappears isn’t especially important, you should be fine.

  • #5 / Feb 06, 2008 1:52am

    Saxi

    108 posts

    As long as the future/expiring entries do not require visibility within the cache time frame it should be fine right?  Like if we use an 8hr cache and we do a future and we don’t care if it takes 1 minute or 8 hours, we should have no problems with a hour cache?

    Right, if the exact time the entry appears/disappears isn’t especially important, you should be fine.

    Any idea if there is a way to adjust the path that is used for the cache folders?

  • #6 / Feb 06, 2008 11:03am

    Robin Sowell

    13255 posts

    Depends a bit- do you mean the top level system/cache folder?  I’d have to dig.  A couple of the specific ones are defined in core.template.php:

    var $t_cache_path        = 'tag_cache/';     // Location of the tag cache file
        var $p_cache_path        = 'page_cache/'; // Location of the page cache file
  • #7 / Feb 06, 2008 11:15am

    Saxi

    108 posts

    Depends a bit- do you mean the top level system/cache folder?  I’d have to dig.  A couple of the specific ones are defined in core.template.php:

    var $t_cache_path        = 'tag_cache/';     // Location of the tag cache file
        var $p_cache_path        = 'page_cache/'; // Location of the page cache file

    Would you change the p_cache_path if you want to move the template cache to another disk?  And if you change this, do these files get overwritten with each update?

    What we were discussing was putting the page cache on a ram disk so it is like keeping it in memory.

  • #8 / Feb 06, 2008 11:25am

    Robin Sowell

    13255 posts

    Heh- you’ve lost me on this one.  Let me check with the server gurus.

  • #9 / Feb 06, 2008 4:52pm

    Boyink!

    5011 posts

    OK - I have little experience here…but asking around brought up the following:

    Does your host have or allow a ram disk in a place that would be accessible to PHP?

    If so (and that sounded like it might be an unusual arrangement) then in theory it could work, but would be way outside of the scope of our tech support.

    Based on the experience I *do* have, I wouldn’t try to overthink the caching - at least not yet.  Use the built-in caching capabilities, use good coding techniques (making good use of the disable parameters everywhere) and monitor the results.  Most of the performance issues I’ve noted were caused by issues at the template level that could be fixed with alternate coding.

  • #10 / Feb 06, 2008 4:55pm

    Saxi

    108 posts

    OK - I have little experience here…but asking around brought up the following:

    Does your host have or allow a ram disk in a place that would be accessible to PHP?

    If so (and that sounded like it might be an unusual arrangement) then in theory it could work, but would be way outside of the scope of our tech support.

    Based on the experience I *do* have, I wouldn’t try to overthink the caching - at least not yet.  Use the built-in caching capabilities, use good coding techniques (making good use of the disable parameters everywhere) and monitor the results.  Most of the performance issues I’ve noted were caused by issues at the template level that could be fixed with alternate coding.

    We have our own servers in our local data center, so we are free to do whatever, it was just a thought we had to increase performance by throwing in a 256MB or so ram disk and throwing the cache on it.  I am curious the type of performance we would see.

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

ExpressionEngine News!

#eecms, #events, #releases