Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a bug where some cache files are created even when template cac…
…hing is disabled
- Loading branch information
Showing
1 changed file
with
86 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d10e868
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'cache_templates' config option is only suppose to turn off the caching of the theme template files.
Other things that get cached like blocks, staticpages and articles are controlled individually.
The topics array should always be cached as they don't change much and it is a big speed increase (especially on sites with a large topic tree structure). When one or more topic does get changed the cache will be recreated on the next view.
If you want the ability to turn off caching of everything site wide then a new config option should be created.
d10e868
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reverted this change for now.
Personally, I have doubts about reasons and effects of excluding three blocks (whatsnew, topicsblock and olderarticles). Especially for beginners' administrators it would not be understood.
When I was testing the installer's migration feature, I was puzzled that the cache files that should have been invalidated remained.
d10e868
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I am not against having a config option to disable all caching, it just shouldn't be the 'cache_templates' as I do have a site that has this disabled but needs the other options enabled. I updated the English config option description for cache_tempates explaining more about what it does and why Admins may want to turn it off.
Depending on how much content the site has depends how much time you save caching those blocks and the cache for those blocks always represents the most up to date information. The real time saver though is caching the TOPIC_buildTree information. On my one site that has a complex topic layout it savings about 2 seconds per page load.
Maybe for those 3 blocks (and other system blocks) we can add a Cache Time to the blocks editor like there is for the regular blocks (and move the What's New Block cache time out of the config). It shouldn't be difficult since the framework is all there. We could also then create a config option to disable all caching done site wide (independent of any individual config option settings)