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

Possible to create multiple independent caches? #30

Open
bonsairobo opened this issue Oct 17, 2022 · 0 comments
Open

Possible to create multiple independent caches? #30

bonsairobo opened this issue Oct 17, 2022 · 0 comments

Comments

@bonsairobo
Copy link

Problem

By only providing a global cache, the "address spaces" of any two different (serializable) data structures relying on Ustr will be wed. The only way to actually use the serialization feature in a coherent way is to keep your string "cache" (more like a database when serialized AND centralized/global) in its own file, and consider it coupled with any other transactions on data structures storing Ustr.

Solution

Allow for users to create their own Bins or something. I'd like to be able to have isolated Bins, and serialize them next to the data structures that depend on them; as it was mentioned in the README, string-interner has this ability. If it's important that you are using lazy_static with a static variable, maybe use once_cell in the public API instead.

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