dprint / dprint

Pluggable and configurable code formatting platform written in Rust.

Home Page:https://dprint.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider a better method to invalidate remote config URL cache

g-plane opened this issue · comments

When extending a remote config with a URL, current implementation is hashing the URL string and using hash as cache key. This can be a trouble because when remote config updated, there's no good way to invalidate the cache. Putting version in URL isn't convenient because someone must remember or check the latest URL.

Current implementation:

async fn resolve_url<TEnvironment: Environment>(url: &Url, environment: &TEnvironment) -> Result<ResolvedPath> {

Is there a better way to invalidate the cache without updating the URL manually?