L-HTTP caching iħalli l-browsers u s-CDNs jerġgħu jużaw rispons minflok jerġgħu jġibuh, ikkontrollat mill-header Cache-Control. Il-mudell rebbieħ għall-web apps: agħmel hash tal-ismijiet tal-fajls tal-assets tiegħek u kkaċjahom għal dejjem; żomm l-HTML mhux ikkaċjabbli.
L-istrateġija b'żewġ livelli
http
# Hashed, versioned assets — content never changes for a given URL
Cache-Control: public, max-age=31536000, immutable
# e.g. /static/app.9f2c1a.js (the hash changes when content changes)
# HTML — must always be fresh so it can point at new asset hashes
Cache-Control: no-cache
