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

How to identify the cache name of a URL used in AsyncImage? #102

Open
h0lg opened this issue Jan 24, 2025 · 0 comments
Open

How to identify the cache name of a URL used in AsyncImage? #102

h0lg opened this issue Jan 24, 2025 · 0 comments

Comments

@h0lg
Copy link

h0lg commented Jan 24, 2025

Background: I want to use the AsyncImage in an app that currently offers custom cache management by content. That includes matching the file names found in the image cache folder with their original http/s URLs referenced in the content. That way the app identifies caches as either belonging to a piece of known content or being loose and obsolete.

Looking into the source I found CachBase<T>.GetCacheFileName(Uri uri) which would be exactly what I need to translate a URL into a cache file name - but it's private in an internal generic class.

Would you consider making this API public?

Making both CachBase<T> and GetCacheFileName(Uri uri) in it public should be enough.

If you additionally moved GetCacheFileName(Uri uri) into a public helper type (since it is static) or a new non-generic super-class of CachBase<T>, that would make it easier to call, i.e. CacheHelper.GetCacheFileName(Uri uri) or CachBase.GetCacheFileName(Uri uri) instead of e.g. CachBase<Bitmap>.GetCacheFileName(Uri uri).

Thank you for your consideration <3

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

1 participant