Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,42 @@ integration.

### Added

* **Cache Naming:** Added `WithName` for assigning an optional cache name used by observability integrations.
* **Cleanup Lifecycle:** Added `StartCleanup` and `StopCleanup` for explicitly controlling periodic expiration cleanup.
* **Metrics Sources:** Added `MetricsSource` for exposing cache statistics to metrics integrations.
* **Metrics Sources:** Added `MetricsSource` for exposing cache identity and statistics to metrics integrations.

### Changed

* **Constructors:** `New` no longer accepts a cache name. `NewWithDefaultLoader` now accepts the loader directly,
followed by options.
* **Metrics API:** Replaced `StatsProvider` and `MetricsRegistration` with `Metrics.Register(MetricsSource) error`.
* **Constructors:** `New` no longer requires a cache name. Cache names are now optional through `WithName`.
`NewWithDefaultLoader` now accepts the loader directly, followed by options.
* **Metrics API:** Replaced `StatsProvider`, `MetricsRegistration`, and `RegisterCache` with
`Metrics.Register(MetricsSource) error`. Metrics implementations now own the lifecycle of their registrations.
* **Background Cleanup:** Cleanup is no longer started automatically during cache construction. `WithCleanupInterval`
configures the cleanup interval, while `StartCleanup` runs the blocking cleanup loop explicitly.
* **Cleanup Defaults:** Background cleanup uses a one-minute interval by default.
* **Benchmarks:** Updated benchmark suites and comparisons for the current cache API.

### Removed

* **Cache Name Accessor:** Removed `Cache.Name`; cache names are now optional and used by observability integrations
through `WithName`.
* **Cache Close:** Removed `Cache.Close`; background cleanup is stopped explicitly with `StopCleanup`.

## extra/paceotel/v1.3.0

This release aligns `paceotel` with the updated `pacecache` metrics API and simplifies metrics registration across
multiple caches.
This release aligns `paceotel` with the updated `pacecache` metrics API and moves metrics registration lifecycle
management to the integration itself.

### Added

* **Reusable Metrics:** A single `Metrics` instance can be shared across multiple caches.
* **Source Validation:** Duplicate cache names are rejected within a `Metrics` instance, while a single unnamed cache is
supported.
* **Metrics Lifecycle:** Added `Metrics.Unregister` for removing registered OpenTelemetry callbacks and releasing
references to registered caches.
* **Instrumentation Scope:** Added `ScopeName` and `Version` for exposing the OpenTelemetry instrumentation scope and
module version.

### Changed

* **Metrics Registration:** Each cache now uses its own OpenTelemetry callback registration.
* **Unregister Lifecycle:** `Metrics.Unregister` removes all registered callbacks, releases references to registered
caches, and prevents further registrations.
* **Registration Ownership:** `Metrics` now owns the registrations for its cache sources instead of returning
per-cache registrations managed by `Cache`.
* **Core Dependency:** Updated `github.com/mkbeh/pacecache` to v1.3.0.

## v1.2.1
Expand Down
Loading