segcache 0.2.0

Segment-structured cache storage engine with eager TTL expiration
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// Copyright 2021 Twitter, Inc.
// Copyright 2023 Pelikan Cache contributors
// Licensed under the MIT and Apache-2.0 licenses

use thiserror::Error;

#[derive(Error, Debug)]
pub enum TtlBucketsError {
    #[error("item is oversized ({size:?} bytes)")]
    ItemOversized { size: usize },
    #[error("ttl bucket expansion failed, no free segments")]
    NoFreeSegments,
}