pedroborges / kirby-blade-template

⬢ Laravel Blade template component for Kirby CMS.
MIT License
27 stars 3 forks source link

Plugin always caches templates #2

Closed fvsch closed 7 years ago

fvsch commented 7 years ago

Hi,

Should the template cache always be active? I expected it to follow the c::get('cache') (or kirby()->get('option', 'cache')) setting.

It was a bit puzzling to get an error saying "in in /Users/Florens/[…]/site/cache/d2039ed96c3f8c364028a47d23fef68b5cfe6b8d.php" when I have caching disabled locally.

Now I’m mostly puzzled because with Twig, the template cache tends to be a bit sticky and require manual purging sometimes. With Blade, it seems that it's picking up template changes easily, so maybe there's no value in avoiding caching.

What do you think?

pedroborges commented 7 years ago

Blade doesn't have any problem with cache invalidation as far as I know. It caches views by default and I guess it doesn't even offer an option to disable it.

One of the great advantages of Blade is that it's views are cached in plain PHP, that allows it to offer and expressive syntax to the developer and little performance overhead.

I'll to add a note on the readme.md about making sure the folder exists and also add a better error message.