PEpebble-cache

pebble-cache

An LRU cache that respects your memory budget

Small, boring and well tested. Does one thing, keeps doing it.

version0.9.4 languageRust licenseBSD-3-Clause stars740 buildpassing

Install

pebble-cache 0.9.4 is published on the package registry for Rust. There is nothing else to download and no build step to configure.

shell
$ cargo add pebble-cache
resolving dependencies…
added pebble-cache 0.9.4 in 1.4s

Releases follow semantic versioning; every published artefact carries a checksum and a signed provenance record.

Usage

The public surface is deliberately small: create a handle, use it, close it. Everything else is configuration with sensible defaults.

example
// create a handle with the defaults
handle = open("service.conf")

set handle.timeout = 30
set handle.retries = 3

result = handle.run(payload)
if result.ok:
    log(result.value)

handle.close()

The full reference, including the error taxonomy and every configuration key, ships with the package as offline documentation.

Why it exists

Boring releases

Semantic versioning and a changelog written for humans.

Predictable memory

Bounded buffers and no hidden allocations in hot paths.

Battle tested

Property tests plus a fuzz suite that runs on every commit.

Graceful shutdown

Drains in-flight work before exiting, always.

Contributing

Patches are welcome, and small ones are welcome most of all.

  1. Open an issue first for anything that changes behaviour, so the design can be discussed before the work happens.
  2. Keep the diff focused. One concern per patch; formatting-only changes go in their own commit.
  3. Add a test that fails without your change. The suite runs in a few seconds and must stay that way.
  4. Write the changelog entry in plain language — it is read by people upgrading, not by machines.

Everything here is released under the BSD-3-Clause license, and contributions are accepted on the same terms.

Latest release0.9.4
LanguageRust
LicenseBSD-3-Clause
Stars740
Dependencies0
Test coverage97%
Support window18 months