Advantages Of View(Page/fragment) Caching

What are advantages of view(page/fragment) caching. Unless you are doing too much of a calculation or large nested loops, I don’t see much use in view caching. I might be missing a point here though.


Much better performance / saves resources for example if you have a complex frontpage:

Assume you cache the whole page:

  • widgets/boxes/sidebar content: no need to initialize/run/render/loading views from the filesystem/db-queries

  • no (or one, if you use dbcache) db-queries instead of several queries

    (latest news, articles, checking users online, creating menu from db, checking permissions …)

  • checking current visible images / slideshow / operations …

It’s almost like your controller would output a static html instead.