Sign up Sign in Samples Blog contact support
page caching

Idea

 

+issue

For a wagn site to scale, we will need, in many cases, to be able to deliver fully cached pages.

But some kinds of content make this problematic, including:

  1. searches
  2. certain contextual names, especially _main and _user
  3. content with permission restrictions
  4. views with context-sensitive code

 

 

 

+solution

The basic idea is to cache all parts of the page without one of the "problems" mentioned above and then make separate requests for those.  This core of the problem is caching "nests".

The nest cachability test will have three levels:

  • cacheable name?  - no if _main, _user, etc.  otherwise...
  • cacheable view? - view can be always, never, or sometimes.  if sometimes then...
  • cacheable core? - this is a quality of the set.  if the core view is cacheable, then all views that depend on the core are, too

Publicly viewable pages can be cached with Varnish.

 

 

+relevant user stories