petergoldstein/dalli
72.6
Strong · 19 September 2026
4.2k
lines of production code
Ruby
primary language
1
measurement over time
What this system is
Dalli is a Ruby client library for Memcached that facilitates caching and session management. It implements the Memcached Meta protocol to support advanced features like item metadata retrieval, pipelined operations, and OpenTelemetry tracing. The system also provides a Rack session store for persisting application sessions in Memcached.
How it got here
2010 — Dalli 5.0 release and modernization
5 changes.
This period focused on the Dalli 5.0 release, which modernized the codebase by dropping the binary protocol and SASL authentication in favor of the Memcached meta protocol. The work included raising the minimum Ruby version to 3.3, updating development tooling with RuboCop and Standard, and expanding test coverage for pipelining and OpenTelemetry instrumentation.
2011–2025 — Meta protocol adoption and test infrastructure
10 changes.
This period focused on upgrading Dalli to implement the Memcached Meta protocol as the default communication layer, replacing the legacy binary protocol. The work included adding a memcached-backed session store for Rack, deprecating legacy CAS modules, and establishing robust CI and local testing environments with comprehensive integration tests and development tooling.
Features
Add VS Code Dev Container for Dalli development
Developers can now use a pre-configured VS Code Dev Container to work on Dalli with a consistent Ruby 3.4 environment, Memcached 1.6.34, and necessary dependencies. The setup includes a Dockerfile, docker-compose configuration, and a setup script that installs Memcached, configures the Ruby environment, and forwards ports 11211–11215 for testing. VS Code extensions for Ruby development (Solargraph, Rubocop, etc.) are automatically installed, and the container is ready to run tests via \bundle exec rake test\ immediately after creation.
.devcontainer · high confidence
Add development and benchmarking utility scripts
New executable scripts have been added to the bin directory to support development workflows: \benchmark\ and \profile\ allow measuring and profiling Dalli performance against a local Memcached instance; \benchmark\_branch\ compares performance between the current branch and a base branch; \compare\_versions\ benchmarks specific released gem versions to detect regressions; \console\ provides an IRB environment with Dalli loaded; and \setup\ automates dependency installation.
bin · high confidence
Add memcached-backed session store using Dalli
Introduces Rack::Session::Dalli, a new session store implementation that persists session data to memcached via the Dalli client. This allows applications to use memcached for session management, supporting both direct client connections and connection pooling for multithreaded environments through the connection\_pool gem.
lib/rack · high confidence
Dalli 5.1.0 release with meta protocol and OpenTelemetry improvements
Dalli has been updated to version 5.1.0, introducing support for the Memcached meta protocol via new methods like \get\_with\_metadata\ and \get\_multi\_with\_metadata\ that return extended cache item attributes (e.g., CAS IDs, hit status, TTL remaining). The library now features enhanced OpenTelemetry instrumentation aligned with stable semantic conventions, allowing users to control query text visibility via the \:otel\_db\_statement\ option and set logical service names with \:otel\_peer\_service\. Additionally, the release includes performance optimizations such as pipelined operations for bulk reads and writes, improved network error retry logic, and better handling of socket timeouts across different Ruby versions.
lib/dalli · high confidence
Introduce the Memcached Meta protocol as the primary client implementation
Dalli now implements the Memcached Meta protocol (introduced in Memcached 1.6) as the default communication layer, replacing the legacy binary protocol. This change introduces a new \Dalli::Protocol::Meta\ class and supporting components (such as \RequestFormatter\, \ResponseProcessor\, and \KeyRegularizer\) that enable advanced features including thundering herd protection (vivify/recache), item metadata retrieval (hit status, last access, TTL remaining), and opaque routing tokens. The new architecture also adds a \:raw\ client option for bypassing serialization and compression, and enforces stricter key regularisation by base64-encoding keys containing control characters or whitespace.
lib/dalli/protocol · high confidence
Behavioural changes
Automated changelog extraction and CI infrastructure updates
This change introduces a new Ruby script, scripts/changelog\_section.rb, which extracts the release notes for a specific version from the CHANGELOG.md file to support automated GitHub releases. It also adds scripts/install\_memcached.sh and a patch for Memcached 1.5.22 to standardize the installation of the test server in CI, including fixes for compilation issues on newer systems. Additionally, CI workflows are updated to use ubuntu-latest and adjust SASL configuration for Memcached testing.
scripts · high confidence
Dalli 5.0.0: Removal of binary protocol and SASL authentication
This release removes the binary protocol and SASL authentication support, shifting the library to rely on the meta protocol for server communication. The main entry point (lib/dalli.rb) has been restructured to require a new set of protocol components, including the meta protocol, value marshaller, value serializer, and string marshaller, while dropping the previous binary protocol implementation. This change simplifies the client's interaction with Memcached by standardizing on the meta protocol and removing legacy authentication mechanisms.
lib · high confidence
Dalli CAS client module deprecated
The \lib/dalli/cas/client.rb\ file has been replaced with a deprecation notice instructing users to remove the \require 'dalli/cas/client'\ statement, as the CAS functionality has been rolled into the standard \dalli/client\ module.
lib/dalli/cas · high confidence
Modernize development tooling and documentation for Dalli 5.0
This update introduces RuboCop with plugins for Minitest, Performance, Rake, and Thread Safety, replacing the previous linting setup. It also adds Standard for code formatting and includes comprehensive upgrade guides for versions 3.0, 4.0, and 5.0, along with a detailed roadmap for the 5.0 release. Documentation is updated to reflect the removal of the binary protocol and SASL authentication, the requirement for Ruby 3.3+ and memcached 1.6+, and the new OpenTelemetry tracing support. The Rakefile is simplified to use Bundler and native test tasks, and legacy files like README.rdoc and .document are removed.
(repo-wide) · high confidence
Test coverage
Added test helper for Memcached server management; Added test utilities for local Memcached management and TLS certificate generation; Added unit tests for the new Meta protocol implementation; Expanded test coverage for pipelined operations, instrumentation, and environment compatibility; Integration test suite for Dalli 5.0.
Dependencies
Dalli 5.0.0: Ruby 3.3+ requirement and dependency cleanup
This release raises the minimum supported Ruby version to 3.3 and drops the binary protocol and SASL authentication features. The gem now depends on Rack 3 and uses Minitest 6 for Ruby 3.2+, while removing legacy dependencies like kgio, base64, and OpenSSL extensions. The gemspec now explicitly requires the 'logger' gem and includes metadata for RubyGems MFA.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 73.
Lenses
- Code Health 94
- Architecture 97
- Maturity 64
- Readiness 78
- Security 75
Changes since last survey
- 300 commits — 232 feature/other, 68 fixes
By area
- lib/dalli — 83 commits
- (repo) — 82 commits
- (root) — 74 commits
- .github/workflows — 27 commits
- test/integration — 12 commits
- bin/benchmark — 5 commits
- test/helper.rb — 4 commits
- test/protocol — 3 commits
- test/test_socket.rb — 3 commits
- test/test_rack_session.rb — 2 commits
- .devcontainer/Dockerfile — 1 commit
- .github/dependabot.yml — 1 commit
- lib/dalli.rb — 1 commit
- lib/rack — 1 commit
- test/test_key_manager.rb — 1 commit
Notable commits
- fix: Add CHANGELOG entry for client-level string_fastpath fix
- fix: Add CHANGELOG entry for string_fastpath flag collision fix
- fix: Add regression test for string_fastpath/compression flag collision
- fix: Add test to show retry bug
- fix: Add v4.3.0 bug fixes and features
- fix: Broaden the fix to all control characters, not just NUL
- fix: Credit Dan Mayer for the original non-StandardError teardown fix
- fix: Fix "character class has duplicated range" warning
- fix: Fix JRuby 10.1 compatibility in supports_connect_timeout?
- fix: Fix JRuby compatibility for timeval pack formats
- fix: Fix JRuby thread interrupt handling in pipelined get
- fix: Fix PipelinedDeleter doc to match tombstone semantics, per Copilot review
- fix: Fix Rubocop
- fix: Fix Rubocop Style/OneClassPerFile warnings and remove Claude workflows
- fix: Fix Rubocop cop name for newer versions
- fix: Fix Rubocop issues
- fix: Fix Rubocop offenses
- fix: Fix Ruby version note in upgrade guide
- fix: Fix a second flake in the Rack session freshness test
- fix: Fix a test lint (#984)
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
petergoldstein/dalli was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit fc1b590e462a9eca2709fabec440d264053242eb — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.