dprint icon indicating copy to clipboard operation
dprint copied to clipboard

Consider a better method to invalidate remote config URL cache

Open g-plane opened this issue 2 years ago • 0 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: https://github.com/dprint/dprint/blob/b1e7cadea29c94c084f9add882aa03c1f811177a/crates/dprint/src/utils/resolve_url_or_file_path.rs#L58

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

g-plane avatar Nov 02 '23 10:11 g-plane