jester icon indicating copy to clipboard operation
jester copied to clipboard

Add never expiring cache for static files

Open al6x opened this issue 4 years ago • 0 comments

A popular way to serve static files is to calculate file hash and set never expiring cache. It could be done same as in Ruby in Rails.

1 Provide helper method for building urls for assets asset_path("/app.js") => "/assets/app.js?filehash=43435bbc1a34"

2 Tell Jester to set never expiring cache header if there's filehash in the path.

P.S.

File hashes could be pre-built before the server deployment with a special task and saved in say public/filehashes.json.

al6x avatar Apr 02 '21 18:04 al6x