// Cache static assets for one week, immutable fingerprinted assets for one year
$manifest= new AssetsManifest($this->environment->path('src/main/webapp/assets/manifest.json'));
$assets= new AssetsFrom($this->environment->path('src/main/webapp'))->with(fn($file) => [
'Cache-Control' => $manifest->immutable($file) ?? 'max-age=604800, must-revalidate'
]);
Current typical code:
Can we simplify the
fn($file) => ...boilerplate?