mmikkel / CacheFlag-Craft

Flag and clear template caches
MIT License
36 stars 5 forks source link

Twig errors #1

Closed jamiepittock closed 9 years ago

jamiepittock commented 9 years ago

Line 101 of CacheFlag-Craft/cacheflag/twigextensions/CacheFlag_TokenParser.php has an issue.

It's currently:

return $token->test('endcachetag');

But should be:

return $token->test('endcacheflag');

Once this has been updated it then throws a different error until the flagged parameter is added. It might be nice if that wasn't required so the tag acted just like the standard cache tag without it.

I also noticed in the 'craft_templatecaches_flagged' database table the columns dateCreated, dateUpdated, and uid don't seem to be saving the correct values.

I hope this helps!

mmikkel commented 9 years ago

Ouch, nice catch @jamiepittock. Thanks for reporting, I'll get that sorted promptly.

mmikkel commented 9 years ago

Look for version 1.0.2, @jamiepittock – all issues you reported should be fixed. Note: You might need to clean out your /craft/storage/runtime/compiled_templates directory manually after updating (though I hope not hehe).

Again, thanks for reporting!

mmikkel commented 9 years ago

Oh, and to be clear – if you leave out the flagged parameter, the cacheflag tag will work like the native cache tag, except it wont save element queries. So really, without the flagged parameter it works more like (well, exactly like) P&T's Cold Cache plugin. All of the native cache tag's parameters should work as normal, though (with or without the flagged parameter).