百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

cachey

> 编程语言
开源

用于对象存储的读取缓存

601 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用于对象存储的读取缓存

Cachey

High-performance read-through cache for object storage.

  • Simple HTTP API
  • Hybrid memory + disk cache powered by foyer
  • Designed for caching immutable blobs
  • Works with any S3-compatible backend, but has its own /fetch API requiring a precise Range
  • Fixed page size (16 MiB) – maps requested byte range to page-aligned lookups
  • Coalesces concurrent requests for the same page
  • Makes hedged requests to manage tail latency of object storage
  • Can attempt redundant buckets for a given object

Motivating context

API

Fetching data

Request

HEAD|GET /fetch/{kind}/{object}
  • kind + object form the cache key
  • kind identifies the bucket set (up to 64 chars)
  • object is the S3 object key
Header Required Description
Range yes Byte range in format bytes={first}-{last}
C0-Bucket no Bucket(s) containing the object
C0-Config no Override S3 request config

C0-Bucket behavior:

  • Multiple headers specify redundant buckets, with the preferred bucket first
  • If omitted, kind is used as the singular bucket name

See replica reads for selection, fallback, hedging, and download limits.

C0-Config overrides: Space-separated key-value pairs to override S3 request configuration per page miss.

  • ct= Connect timeout (in case an existing connection could not be reused)
  • rt= Read timeout (time-to-first-byte)
  • ot= Operation timeout (across retries)
  • oat= Operation attempt timeout
  • ma= Maximum attempts for each bucket's primary SDK operation
  • ib= Initial backoff duration
  • mb= Maximum backoff duration
  • fps= Force path-style addressing

SDK overrides are bounded by the server's download deadlines; early hedges use one SDK attempt.

Example Request

http
GET /fetch/prod-videos/movie-2024.mp4 HTTP/1.1
Range: bytes=1048576-18874367
C0-Bucket: us-west-videos
C0-Bucket: us-east-videos-backup
C0-Config: ct=1000 oat=1500 ma=5 ib=10 mb=100

Response

The service maps requests to 16 MiB page-aligned ranges and the response has standard HTTP semantics (206 Partial Content, 404 Not Found etc.)

Header Description
Content-Range Actual byte range served
Content-Length Number of bytes in response
Last-Modified Timestamp from first page
Content-Type Always application/octet-stream
C0-Status Status for first page

C0-Status format: {first}-{last}; {bucket}; {cached_at}

  • Byte range and which bucket was used
  • cached_at is Unix timestamp with 0 implying a cache miss
  • First page status is sent as a header over both HTTP/1.1 and HTTP/2
  • Multi-page GET responses include subsequent page statuses as trailers over HTTP/2 only

Use HTTP/2 when you need per-page status for a multi-page read. HTTP/1.1 responses include Content-Length and only the first page's status.

Example Response

http
HTTP/1.1 206 Partial Content
Content-Range: bytes 1048576-18874367/52428800
Content-Length: 17825792
Content-Type: application/octet-stream
C0-Status: 1048576-16777215; us-west-videos; 1704067200

Monitoring

GET /stats returns throughput stats as JSON for load balancing and health checking.

GET /metrics returns a more comprehensive set of metrics in Prometheus text format.

Command line

Docker images are available.

…

Development

  • justfile contains commands for just doing things
  • AGENTS.md and symlinks for your favorite coding buddies
  • Replica simulation harness

Use the nightly Cargo dependency commands so that the seven-day publication cooldown applies:

bash
cargo +nightly add 
cargo +nightly update
cargo +nightly update -p 
cargo +nightly remove 
cargo +nightly generate-lockfile

Use --locked with normal build, check, test, run, document, fetch, and metadata commands. The pull request dependency gate verifies each proposed lockfile change before Rust build jobs start.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言