Commit graph

2 commits

Author SHA1 Message Date
darbs-claude
7fba0955e4 refactor: namespace cache keys to prevent collisions (closes #20)
Some checks failed
CI / PHP 8.3 (pull_request) Failing after 1m35s
CI / PHP 8.4 (pull_request) Failing after 1m31s
Replace hardcoded cache key in ForAgentsController with a config-based
key (`mcp.cache.for_agents_key`) and configurable TTL
(`mcp.cache.for_agents_ttl`). This prevents collisions with other modules
or packages that might use the same flat cache key.

- Add `cacheKey()` method on ForAgentsController, reads from config
- Add `cache` section to config.php with default key and TTL
- Dynamic Cache-Control max-age now follows the configured TTL
- Add ForAgentsControllerTest covering key customisation,
  cache storage, invalidation, TTL, and response structure

Refs: TODO.md CQ-003

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 06:18:30 +00:00
Snider
1350472d11 monorepo sepration 2026-01-27 00:28:29 +00:00