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 embedded templates?

October 03, 2008 11:21pm

Subscribe [1]
  • #1 / Oct 03, 2008 11:21pm

    Carlos Pero

    6 posts

    I see how this Wiki page says to turn on caching for embedded templates:

    http://expressionengine.com/wiki/Optimize_EE/

    but I’m attempting to verify that caching is working, but I simply don’t see that it is.  Should it?

    For instance, I have blog/index as my home page.  It is including the embedded template blog/include.  I’ve set blog/include to be cached in Template Preferences. But when I request blog/index, nothing gets cached…meaning I don’t see files written out to system/cache/page_cache/.  If I request blog/include directly from the browser, indeed a cached directory and two files appear inside it, but not if it’s requested via an embedded template only.

    Is the system supposed to behave this way?

  • #2 / Oct 04, 2008 9:37am

    Carlos Pero

    6 posts

    Ugh.  Never mind.  Turns out that I only had static text in the blog/include template, which means it really wasn’t getting evaluated by the parser and thus not cached.  As soon as I added something simple like {current_time} it started working and I could see the cached embed.

    For the record, we got bit by a similar problem in CodeIgniter, attempting to cache based solely on Controller output and not View output:

    http://ellislab.com/forums/viewthread/61350/#304833

    Interesting stuff.  I’m glad it works as advertised.

  • #3 / Oct 04, 2008 9:54am

    Ingmar

    29245 posts

    Thanks for letting us know, and glad to see you’re all set.  If anything else comes up, please don’t hesitate to start a new thread.

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

ExpressionEngine News!

#eecms, #events, #releases