Skip to content

Possible to create multiple independent caches? #30

@bonsairobo

Description

@bonsairobo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions