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.

Tag-caching clears cache on channel data change?

November 30, 2010 8:17pm

Subscribe [9]
  • #1 / Nov 30, 2010 8:17pm

    chichilatte

    43 posts

    Hi, i’ve just discovered tag-caching, which seems amazing, significantly reducing the number of db queries on my pages. However, the docs hardly say anything about it, and particularly they don’t say if the cache is cleared when the data changes (as happens with template caching).

    Course, I’ve tested it and this is what seems to happen 😊 but i just want to check for the official answer.

    If it’s true, the only reason you wouldn’t have tag caching turned on *everywhere* is if your template loops are time dependent, right?

  • #2 / Dec 01, 2010 10:13am

    Sue Crocker

    26054 posts

    It may also depend on your host. For instance, you don’t normally need to turn on template caching on EngineHosting.. Yes, the cache is cleared when certain events happen.

  • #3 / Dec 01, 2010 10:18am

    chichilatte

    43 posts

    Thanks Sue. Is it possible that you could tell us what those events are? It would be really good to be clear on this.

  • #4 / Dec 01, 2010 5:59pm

    Ingmar

    29245 posts

    Tag caching means that an entry might not go “live” at the exact specified time, because the tag’s cache hasn’t expired, or might not disappear from the site at once, things like that. A new entry should trigger a cache refresh anyway, however.

  • #5 / Aug 04, 2011 9:12am

    GDmac - expocom

    350 posts

    This Feature request is related to an previous Support Question:
    When is the (channel) cache cleared when the data changes (as happens with template caching).

    Sorry to dig up an old thread (google-ing for fine grained cache info).
    Ingmar, that’s interesting approach that some entries “might not go live” (future entries) or disappear (expiration time) due to enabling caching. 

    Some questions are still standing:
    - Which actions do fire a cache flush? 
    And i Quote (template caching):
    For example, if you cache your comments page, when someone submits a comment, the cache will be cleared
    1. how does it determine we’re on a comments-page? Channel comments-page setting? Comments-tag?
    2. What are other examples (and determined by what) when the cache will be flushed?
    3. What actions cause a channels-tag cache to refresh? Or is that caching ‘only’ time based?

    Currently it is a bit of behind the scenes magic, and sadly not very well explained.

    (continued here: caching feature request)

  • #6 / Aug 04, 2011 6:01pm

    Brandon Jones

    5500 posts

    Hi GDmac,

    I am not sure what you mean by “channel cache”. Is your question regarding tag caching or template caching? The behavior will depend on the cache type. I agree that this should be documented better, as well.

  • #7 / Aug 04, 2011 6:15pm

    GDmac - expocom

    350 posts

    Referring to the channel:entries cache=“yes” refresh=“60”
    What (edit/publish or other?) actions cause the cache to refresh? Or is it ‘only’ time based?

  • #8 / Aug 05, 2011 3:06pm

    Sue Crocker

    26054 posts

    Hi, GDmac. let me ask the dev team. 😊 Thanks in advance for your patience.

  • #9 / Nov 30, 2011 4:34pm

    GDmac - expocom

    350 posts

    Any news on this?

  • #10 / Dec 05, 2011 7:32pm

    Kevin Smith

    4784 posts

    Hi GDMac,

    It’s my understanding that the Template Cache clears itself when new comments or new Channel Entries are added to the system. I’d like to get you a better explanation from the devs, however, so let me ask one of them. I’m sorry your question was forgotten before, but I can promise we’ll get back to you this time!

  • #11 / Dec 07, 2011 3:05am

    John Henry Donovan

    12339 posts

    Hi GDmac,

    Here is my compiled list of actions that clears your caching

    Some only happen if the config is set to clear cache on new entry ($config[‘new_posts_clear_caches’] = ‘y’;)

    * Comments have a few exceptions and intricacies

    - Deleting a Category Group (clears all cache)
    - Updating or creating a Category (clears relationship cache)
    - Ordering categories (clears database cache)
    - Updating, creating or deleting a Category Custom Field (clears all cache)

    - Deleting a Field Group (clears all cache)
    - Updating, creating or deleting a Custom Field (clears all cache)

    - Deleting a Status Group (clears all cache)

    - Updating Multi Entries (clears if needed either all or sql cache)
    - Updating Multi Categories (clears if needed either all or sql cache)

    - Deleting Watermark Preferences (clears db cache)
    - Updating or Deleting Upload Preferences (clears db cache)

    - Updating or creating a Snippet (clears all cache)
    - Updating or creating a Global Variable (clears all cache)

    - Updating a Template (clears all cache)
    - Creating a Template from File (clears db cache)

    - Updating an Email Notification (clears all cache)
    - Updating a Theme Template (clears all cache)
    - Running a Template Sync (clears all cache)

    - Submission, updating or deleting of an Entry through API (clears if needed either all or sql cache)

    - Creating, updating or deleting a Comment (clears all cache *)
    - Change Comment Status (clears all cache)
    - Comment Preview (clears all cache *)

    - Publish or Edit Metaweblog Post (clears if needed either all or sql cache)
    - Set Metaweblog Post Category (clears if needed either all or sql cache)

    - Checking Moblog (clears if needed either all or sql cache)

    - Create or Update Simple Commerce item (clears page cache)

    - Deleting files from Wiki (clears db cache)
    - Update Wiki Template (clears all cache)
    - Editing Wiki Article (clears db cache)
    - Opening or closing a Wiki Revision (clears db cache)

  • #12 / Dec 08, 2011 2:57pm

    Kevin Smith

    4784 posts

    GDMac, was John Henry’s list helpful for you?

  • #13 / Feb 14, 2012 9:04pm

    Sobral

    87 posts

    I don’t know if helped GDMac, but helped me!

    Why this list isn’t on user guide? Could somebody put this list there? Please!

  • #14 / Feb 16, 2012 6:10pm

    Sean C. Smith

    3818 posts

    Hi Robson,

    I agree that the docs could be improved with that information and as such I’ve filed a bug report for you on this issue.

  • #15 / May 25, 2012 12:34pm

    Adam Christianson

    115 posts

    Great info on the cache stuff from John Henry and I’ll add my vote for this being added to the docs.

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

ExpressionEngine News!

#eecms, #events, #releases