solid / solid/specification

Allow clients to configure caching headers

Open
#385 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic: caching
Dominant language
HTML
Stars
563
Forks
108
Avg merge
4d 13h
Merged PRs (30d)
3

Description

In the current spec, there is no mention of which caching headers should be returned for resources, so I suppose the current approach is to leave that decision to POD implementers. However, there are some situations where it would be desirable to configure them depending on the nature of the files, not only their mime-types.

For example, I'm building an application to manage cooking recipes, and I will allow users to upload their own images. I have noticed that the current implementations (at least the ones I've tried) don't return the Cache-Control header at all, so clients would be requesting the image every time (even though some of them return ETag, which would improve the performance, but it's still not ideal). Given the nature of these images, I would like to cache them for a long time. Furthermore, if the image in cache becomes stale, I wouldn't mind using those when the application is offline.

Given that use-case, images seem like a good candidate to have long-lived caching headers by default. But there may be some edge cases where this is not desirable, for example images that change more frequently and shouldn't be used when stale.

Keeping all that in mind, I think it would be nice if PODs have some defaults for each mime-type (at the discretion of each POD implementation), but it's possible to configure by clients that create or manage these files. I could see this working in a similar way to ACLs for example.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository file, test, or entry point to change. Start by reviewing the existing resource and ACL configuration sections in the specification, then determine how cache defaults and client overrides should be represented and what behavior should be normative. Done means the specification clearly defines caching-header configuration, defaults, and stale-resource behavior.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.