Partial page caching

From Wikitech

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.