When using a CDN for dynamic content (*), ajax_blocks hits the origin server (Drupal) for every anonymous view. Worse, Drupal doesn't cache the /ajaxblocks output at all.

This could be solved by providing two AJAX endpoints: /ajaxblocks_nocache (to be requested by JS when a user is cookie present) and /ajaxblocks_cacheable (requested for anonymous users, which DOES allow caching, both in the CDN and in Drupal)

Thoughts?

--

(*) e.g. Cloudflare with a cache-everything rule, or Incapsula. In Free mode, these services do not honor the Vary:Cookie header

Comments

drupdan3’s picture

Issue summary: View changes
drupdan3’s picture

Issue summary: View changes