processone/cache_tab
51.9
Adequate · 2 October 2026
1.4k
lines of production code
Erlang
with C
2
measurements over time
What this system is
This system is an Erlang library providing an in-memory ETS-based cache with support for distributed operations across cluster nodes. It features a C-based NIF component designed for safe hot code swapping and state persistence during upgrades. The library includes a comprehensive API for cache management, configuration, and testing, built on modernized build tools compatible with recent Erlang/OTP versions.
Features
Add ETS cache default configuration macros
A new header file, include/ets\_cache.hrl, has been added to define default configuration options for the ETS cache system. This introduces macros for the maximum cache size (DEFAULT\_MAX\_SIZE), the cache entry lifetime (DEFAULT\_LIFE\_TIME), and the behavior for cache misses (DEFAULT\_CACHE\_MISSED), allowing components to reference these standard values.
include · high confidence
Behavioural changes
Build system modernized and Erlang/OTP 23 compatibility added
The project now supports building with both rebar and rebar3 via a new \rebar.config.script\ and a parametrizable \REBAR\ variable in the Makefile. To ensure compatibility with Erlang/OTP 23 and later, the build configuration now conditionally defines \USE\_OLD\_PG2\ for older releases (R18–22), addressing deprecation issues in newer OTP versions. Additionally, the \rebar.config\ has been expanded to include \nowarn\_export\_all\, stricter xref checks, and explicit dependency management for \p1\_utils\ (v1.0.29), while the \Makefile\ now exposes a \test\ target for running EUnit suites.
(repo-wide) · high confidence
Cache library rebranded to ets\_cache with expanded API and distributed operations
The in-memory cache library has been renamed from cache\_tab to ets\_cache (version 1.0.34) and re-licensed under Apache 2.0. The new ets\_cache module provides a comprehensive API for managing ETS-based caches, including functions to create, delete, and configure cache tables (new, delete, setopts), perform lookups with callback support (lookup/2,3), and insert or update entries (insert, insert\_new, update). It introduces distributed dirty operations (dirty\_dist\_insert, dirty\_dist\_delete) that propagate changes across cluster nodes, as well as convenience functions to start and stop the application (start/0, stop/0). The underlying treap implementation has been replaced by the treap module from p1\_utils, and the application now initializes global cache options via p1\_options.
src · high confidence
Rewritten ETS cache NIF with upgrade support
The C source implementation for the ets\_cache NIF component has been rewritten to eliminate static variables and introduce an upgrade callback, allowing the module to be safely reloaded without losing state during hot code swaps. This change improves stability and ensures that counter data persists across application upgrades.
_c\src · high confidence
Test coverage
Added EUnit tests for the cache\_tab module
A new test suite (test/cache\_tab\_test.erl) has been added to verify the behavior of the cache\_tab module. The tests cover core operations including inserting, looking up, and deleting entries (both dirty and standard modes), cleaning tables, retrieving table information, and handling error conditions such as bad arguments or failing callback functions.
test · 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
Score
- CAI 52 → 52 (+0.2)
- Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 94 → 94 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 35 → 35 (+0.3)
- Readiness 68 → 68 (+0.0)
- Security 61 → 61 (+0.0)
Resolved (6)
- Coverage not measured — no coverage collector is wired up
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Hotspot: src/cache_tab.erl (src/cache_tab.erl)
- Hotspot: src/ets_cache.erl (src/ets_cache.erl)
- Off-boarding risk: anonymized user #1
New (3)
- Dependency hygiene PARTLY measured — rebar3 pinning read, dependency currency not (no rebar.lock-pinned Hex declaration to grade)
- No dependency lockfile committed (rebar.config)
- Off-boarding risk: anonymized user #1
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
processone/cache_tab 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 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit b3d083a8bca01464402d091aace98211aae8d1ce — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.