esmero / format_strawberryfield

Set of Display formatters, extractors and utils to make Strawberry field data glow
GNU Lesser General Public License v3.0
6 stars 9 forks source link

View modes are cached as a whole. Breaks embargo for IPs #412

Closed DiegoPino closed 4 months ago

DiegoPino commented 5 months ago

What?

Even if we managed to skip the Page Cache & the dynamic cache, Drupal still caches the Render arrays. And even if we pass for each field max-age=0 it still does not resolve/permeate up and caches the hell out of everything.

The solution I found is tricky and acts on the last minute when the Entity Type renderer returns a View Mode/Display Mode array built. We call again a statically cached version of the Resolver and swap there the max-age=0 at the last minute on the top...

GOSH

DiegoPino commented 4 months ago

Solved via https://github.com/esmero/format_strawberryfield/commit/a6c020d99d35729458e71dcc12ca4f468117cf6e