This directory contains runnable examples demonstrating the main pacecache usage patterns.
| Example | Demonstrates |
|---|---|
basic |
Cache-aside loading, direct lookups, entry metadata, not-found loader behavior, deletion, and cache statistics |
otel |
Exporting pacecache metrics with the optional extra/paceotel OpenTelemetry integration |
Run an example from its directory:
cd basic
go run .Or run it from the repository root:
go run ./examples/basicThe examples are self-contained and do not require external services. Refer to the README in each example directory for the demonstrated workflow and additional details.