This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

JasonSuave
JasonSuave

I've been wondering how to tackle caching of database calls. Using the Blog component results in about 6 queries being executed and I would like to reduce those since I won't be updating these posts every day. I wondered if there is some way to force caching here. Perhaps I could extend the Blog component and use Eloquent's 'remember' functionality?

And is there any documentation on how October caches pages? Is there a difference between pages that are completely static and ones that use content from a database (like the Blog component)?

daftspunky
daftspunky

The CMS templates are cached (configuration, php and twig sections), then the Twig markup is compiled and cached. Essentially the cache is the same as if you were running a single PHP script. So the database calls are not cached or anything like this.

Perhaps you can submit a Pull Request to improve the database caching?

https://github.com/rainlab/blog-plugin

Last updated

rchemin
rchemin

October is a great tool that I am trying to test . Add a caching system may be useful for dynamic data from the database . Why not cache the data in a blog post and to regenerate at a modifcation in the backend ? Something like that : http://buildwithcraft.com/docs/templating/cache

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.