Skip to content

Add never expiring cache for static files #277

@al6x

Description

@al6x

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions