Skip to content

Commit 5ec95bd

Browse files
committed
[Encore] Added some comments about asset versioning and deployment
1 parent 5d338c1 commit 5ec95bd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

frontend/encore/versioning.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,23 @@ like normal:
6969

7070
<img src="{{ asset('build/images/logo.png') }}">
7171

72+
Troubleshooting
73+
---------------
74+
75+
Asset Versioning and Deployment
76+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77+
78+
When deploying a new version of your application, versioned assets will include
79+
a new hash, making the previous assets no longer available. This is usually not
80+
a problem when deploying applications using a rolling update, blue/green or
81+
symlink strategies.
82+
83+
However, even when applying those techniques, there could be a lapse of time
84+
when some publicly/privately cached response requests the previous version of
85+
the assets. If your application can't afford to serve any broken asset, the best
86+
solution is to use a CDN (or custom made service) that keeps all the old assets
87+
cached for some time.
88+
7289
Learn more
7390
----------
7491

0 commit comments

Comments
 (0)