Migrate all repos into monorepo context folders
Bahn: aisupport, Analyse-O2C-C2S, awesome-bahn-mcp-servers, beam-mcp,
Confluence_Bot, db-planet-mcp-server, O2C-Harness, project-audit,
Projekt-KIQ-HP, teamlandkarte-mcp
Dhive: Jury-Voting
Privat: CV, NoteGraph (NOTE: NoteGraph needs complete redo after consolidation)
Shared: AI-Orchestrator, OrgMyLife, power_skills_and_more
Shared/references: symphony (read-only)
Bahn repos remain available as independent remotes - this monorepo
pulls them in via subtree, the originals are untouched.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from teamlandkarte_mcp.cache.query_cache import QueryCache
|
||||
|
||||
|
||||
def test_query_cache_hit_miss_behavior() -> None:
|
||||
cache: QueryCache[int] = QueryCache(ttl_hours=12, max_size=10)
|
||||
calls = {"n": 0}
|
||||
|
||||
def fetch() -> int:
|
||||
calls["n"] += 1
|
||||
return 123
|
||||
|
||||
assert cache.get_or_fetch("k", fetch) == 123
|
||||
assert cache.stats["misses"] == 1
|
||||
assert cache.stats["hits"] == 0
|
||||
assert calls["n"] == 1
|
||||
|
||||
assert cache.get_or_fetch("k", fetch) == 123
|
||||
assert cache.stats["hits"] == 1
|
||||
assert calls["n"] == 1
|
||||
Reference in New Issue
Block a user