Published by Mijingo

movie icon image

EE Insider Blog

Spend your time learning and developing sites with ExpressionEngine and we'll use this blog to keep you informed of all the news related to ExpressionEngine and CodeIgniter.

» Read more in the Archives.

» Have a tip? Send us your EE news.

Learn ExpressionEngine Today

Over a series of 8 videos, watch and learn as Ryan builds an entire ExpressionEngine website from beginning to end. Get started now.

In the Forums: Caching embedded templates

An interesting thread about caching embedded templates and, in general, how EE template caching works. There are a couple of important morsels of information here. First, from EllisLab TSS Ingmar Greil:

Caching is done on a per-URL level, not a template level: if you have the same template that is used to power each of your articles you will have a copy for each URL, same with embedded templates, if you embed the sidebar template into each page and you cache the sidebar template, you will have a copy for each URL.

Ingmar also quotes Nevin Lyne of EngineHosting:

Unless you actually are seeing a specific need, for a specific template, to be cached, I would highly recommend to not cache unless you have to. That goes for query caching, too.

Wise words.

Read the whole thread: Caching Embedded Templates

Posted on May 05, 2010 by Ryan Irelan

Filed Under: In the Forums

Derek Hogue06:47 on 05.05.2010

It should be noted, I think, that this thread seems to relate only to Template Caching and Query Caching, not Tag Caching.

smartpill12:16 on 05.11.2010

So are they saying that caching a page template with embeds already caches those embeds in context and caching the embedded templates only unnecessarily duplicates the caching so if they are being cached it’s better to turn off the individual embedded templates’ caching? (That’s probably the most times I will ever use the word “cache” in one sentence)