Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add never expiring cache for static files #277

Open
al6x opened this issue Apr 2, 2021 · 0 comments
Open

Add never expiring cache for static files #277

al6x opened this issue Apr 2, 2021 · 0 comments

Comments

@al6x
Copy link

al6x commented Apr 2, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant