Let users configure cache settings through patterns (fnmatch).
I was thinking about implementing this by reading the rules from a file named something like
It could then contain rules like this:
Does this make sense? Or perhaps there's a better way to do it?
I think it would be better to let users configure the cache settings via GraphQL rather than with magic files.
I am considering picking this up to get more familiar with GraphQL and the related tooling. My general approach would be:
- Based on an API call (see below), store a given value with the
Cache-Controlkey in one or more objects meta data
- When serving the object, copy the value from the (already available) meta data into the response header
Questions would be:
- Does that approach make sense to you?
- The API call: should it be a new one? Or integrated into the upload call?
- The input data: do we want to get fancy (e.g.
*.css) or keep it simple (full paths only)?
I think what this should ideally look like is an update to input SiteConfig which adds an array of (glob, cache-control header value) to the site configuration.
Conrad Hoffmann referenced this ticket in commit ac8a24f.
Conrad Hoffmann referenced this ticket in commit f209b01.