supercache

Crates.iosupercache
lib.rssupercache
version0.1.0
created_at2025-12-29 03:16:05.772232+00
updated_at2025-12-29 03:16:05.772232+00
descriptionFastest cache
homepage
repositoryhttps://github.com/nnachonesa/supercache
max_upload_size
id2009893
size23,588
(nnachonesa)

documentation

README

supercache

An cache that its fast - read docs for more info!

Struct

  • Vec of buckets (Vec<Vec<(K, V)>>)
  • Simple hash in bytes ASCII
  • colision manage by separate chaining

Features

  • Search and save by hash
  • Collision handling with buckets
  • Simple and readable code

Example

use supercache::Supercache;

fn main() {
    let mut cache = Supercache::new(None);
    map.set("cat", 1);
    map.set("dog", 2);

    println!("{:?}", map.get("dog"));
}

Methods

new(bucket_size)

Create new table

set(key, value)

Insert or overwrite an value

get(key)

Find an value by key.

delete(key)

Delete an element

clear()

Clear all buckets

Commit count: 0

cargo fmt