0

This is a cross-post from the Devot:ee forums.
http://devot-ee.com/add-ons/support/ce-cache/viewthread/9173

I’m hoping I’m missing something simple.
My {exp:ce_cache:escape} tag pair simply seems to be ignored.

Templates aren’t unusual.

{exp:ce_cache:it}
  {exp:ce_cache:escape}
    {current_time format="%g:%i:%s"}
  {/exp:ce_cache:escape}
{/exp:ce_cache:it} 

The time never changes.
When I look at the cached file through the CP, it shows the cached time, not the tag.

3

Escaping will escape pretty much everything it can with {exp..} tags and later in the parse order. If you would like to escape things with an early parse order too, like global variables, you'll want to use pre escaping. Here's an explanation from the Pre Escaping documentation.

If the Escape tag is given a unique tagpart (example: {exp:ce_cache:escape:blah}…{/exp:ce_cache:escape:blah} has a unique tagpart of blah) then its tagdata will be pre-escaped (escaped even before segment variables and globals are parsed) when using EE 2.4.0+.

I hope that helps. :)

Edit

Here's a quick example:

{exp:ce_cache:it}
   <p>This should be cached: {current_time}</p>

   {exp:ce_cache:escape:pre}
      <p>This should not be cached: {current_time}</p>
   {/exp:ce_cache:escape:pre}
{/exp:ce_cache:it}

Disclaimer: I'm the author of CE Cache.

| improve this answer | |
  • My problem was that I was trying to pre-escape within a snippet. 1.9.4 beta supports this. Thanks! – Jason Varga Apr 9 '13 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.