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

Dealing with Expiring Configuration #18

Open
EdwardHinkle opened this issue Apr 4, 2019 · 2 comments
Open

Dealing with Expiring Configuration #18

EdwardHinkle opened this issue Apr 4, 2019 · 2 comments

Comments

@EdwardHinkle
Copy link

There are instances where the configuration of a Micropub endpoint can change. Currently both the Media Endpont url and the syndication values are in the Micropub's config query. Because the Media Endpoint is an external service it makes sense that at times this url may change, and the user shouldn't have to log out and back in to update that value.

We did some brainstorming about this in chat.

One option is that a Micropub server could provide a time after which the config values should be refetched. This is particularly useful in the scenerio I discuss in chat where I might have to update my Media Endpoint url every 7 days due to Amazon s3 restrictions. In this case the server could add a new configuration value called "expires_in" similar to the access token's attribute (#17) that defines the number of seconds that the configuration values are valid for, after which the Micropub client should refetch the configuration values before using them.

If no expires_in is provided, we might come up with a suggested default timeframe to refetch the config values or just recommend a button in settings that allows a user to refetch all the config values without having to log out and back in essentially refreshing their Media Endpoint url and syndication links.

@manton
Copy link

manton commented Jul 28, 2020

Even if there's no expiration set, I feel like q=config should be such a lightweight call that it's fine for a client to hit it frequently. In Micro.blog, I think I refresh the config right before someone uploads a photo, just to make sure I have the right media endpoint. Web apps could cache it for a few hours or a day.

@jalcine
Copy link

jalcine commented Apr 2, 2021

I’m thinking about leaning on conventional HTTP stuff here and setting Cache-Control in Koype and then using that when present in Lwa and other tools. The thing being tracked/timed feels like the configuration at hand and instead of having make something new for it, I think leaning into existing stuff here would make sense for me.

(Originally published at: https://v2.jacky.wtf/post/d627793e-76a4-49b7-8574-e54b526da3a5)

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

3 participants