Jump to content

Partial page caching

From Wikitech
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

See the RFC at mw.org for current-day information.


Both Varnish and Squid support edge side includes (ESI), although allegedly Varnish's support is limited.

If implemented, Mediawiki could send out sections of a page like so:

<esi:include src="http://en.wikipedia.org/wiki/Special:CentralNotice?action=gimmestuff" onerror="continue"/>

This would be interesting to have as a parser feature, so that dynamic content in a page can be included without invalidating the cache of the entire page. This would let us do lots of cool things like:

  • Dynamically changing content based on the user's location
  • Instant banner loading for CentralNotice
  • Partially cache pages for logged in users to optimize page loading
  • SVG client-side rendering

Gabriel Wicke may have experimented with this at one time. Artur Bergman/Wikia has played with it too.