Skip to content

Adhere to Rust naming conventions #32

@virtualritz

Description

@virtualritz

See Rust API Guidelines on naming.

LRUCache -> LruCache
TinyLFU -> TinyLfu
SampledLFU -> SampledLfu
WTinyLFUCache -> WtinyLfuCache

Also note the inconsitencies:

  • Lru is used as a prefix but Lfu is used a postfix (mostly).
  • WTinyLFUCache and LRUCache have a Cache` postfix, the other caches have not.

I suggest:

LruCache
LfuCacheTiny
LfuCacheSampled
LfuCacheTinyWindow

or:

Lru
LfuTiny
LfuSampled
LfuTinyWindow

Also there are getters starting with get_, notably:

get_mru/_mut]() -> mru()/mru_mut()
get_lru/_mut]() -> lru()/lru_mut()
get_max_cost() -> max_cost()

Aliases/inline methods with deprecation warnings can be added to not break dependents.

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