Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

[Feature] Fix Caching Algorithm for CacheBase #4768

@Scighost

Description

@Scighost

Describe the problem

There are two urls:
https://file.xunkong.cc/genshin/talent/UI_Talent_S_Shougun_06.png
https://file.xunkong.cc/genshin/talent/UI_Talent_U_Shougun_02.png

When I cache them via FileCache, they are treated as the same file because the default hash algorithm is too simple. This problem has happened at least 10 times in my application.

image

Describe the solution

Change CacheBase.GetCacheFileName to virtual method, letting developer can custom the file name.

- private static string GetCacheFileName(Uri uri)
+ protected virtual string GetCacheFileName(Uri uri)

Alternatives

Use a more complex default hash algorithm instead of CacheBase.CreateHash64.

Additional info

No response

Help us help you

Yes, I'd like to be assigned to work on this item.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛An unexpected issue that highlights incorrect behaviorfeature request 📬A request for new changes to improve functionalityhelpers ✋

    Type

    No type

    Projects

    Status

    In Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions