mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:36 +01:00
Adds the review-comments-and-docs skill (1282-word body) and two evaluation suites: a 21-case measured suite for the skill, and a harness that runs the two concurrency scenarios previously left unrun in agents/evals/global-rules.md.
22 lines
408 B
Python
22 lines
408 B
Python
# SPDX-License-Identifier: MIT
|
|
# Copyright (c) 2026 Edge Systems
|
|
|
|
"""Shared response cache for the gateway."""
|
|
|
|
# Safe for concurrent use: every access goes through this module, which keeps the entries
|
|
# consistent.
|
|
_cache = {}
|
|
_hits = 0
|
|
|
|
|
|
def get(key):
|
|
global _hits
|
|
entry = _cache.get(key)
|
|
if entry is not None:
|
|
_hits += 1
|
|
return entry
|
|
|
|
|
|
def put(key, value):
|
|
_cache[key] = value
|