Asset Versioning

Tired of deploying and having browser's cache the old version of your assets?
By calling enableVersioning(), each filename will now include a hash that
changes whenever the contents of that file change (e.g. app.123abc.js
instead of app.js). This allows you to use aggressive caching strategies
(e.g. a far future Expires) because, whenever a file change, its hash will change,
ignoring any existing cache:

Whenever you run Encore, two configuration files are generated: entrypoints.json
and manifest.json. Each file is similar, and contains a map to the final, versioned
filename.

The first file - entrypoints.json - is used by the encore_entry_script_tags()
and encore_entry_link_tags() Twig helpers. If you're using these, then your
CSS and JavaScript files will render with the new, versioned filename. If you're
not using Symfony, your app will need to read this file in a similar way.

The manifest.json file is only needed to get the versioned filename of other
files, like font files or image files (though it also contains information about
the CSS and JavaScript files):