repository-cache-keeper

Enforce repository boundaries, endpoints, and cache coherence in DiscordPHP's repository layer.

1.1k|250|Updated Aug 12, 2015
One-click install
npx skills add https://github.com/discord-php/DiscordPHP --skill repository-cache-keeper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: repository-cache-keeper
Source: https://github.com/discord-php/DiscordPHP/tree/main/.agents/skills/repository-cache-keeper
Command: npx skills add https://github.com/discord-php/DiscordPHP --skill repository-cache-keeper

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Maintain and enforce consistency of repository boundaries, endpoint mappings, and cache coherence during REST interactions for DiscordPHP's repository layer. This helps prevent drift between in-memory collections, cache, and API routes.

Core Features & Use Cases

  • Enforces typed repositories, correct endpoint templates, and proper binding of parent context (guild_id, channel_id, etc).
  • Coordinates cache coherence with REST mutations to keep client state consistent.
  • Use Case: When changing how repositories fetch or persist data, ensure boundaries and cache policies remain aligned across src/Discord/Repository and related parts.

Quick Start

Review and align repository boundaries and cache semantics whenever touching src/Discord/Repository.

Frequently Asked Questions about repository-cache-keeper

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I maintain repository boundaries and cache coherence in DiscordPHP?

To maintain repository boundaries and cache coherence in DiscordPHP, enforce typed collections, validate endpoint templates, and coordinate cache synchronization during REST mutations across the src/Discord/Repository layer.

What causes cache drift between in-memory collections and REST API routes?

Cache drift between in-memory collections and REST API routes occurs when repository boundaries and endpoint mappings are not enforced during REST mutations, causing client state to desynchronize from the Discord API.

How do I enforce typed collections and parent context binding in DiscordPHP repositories?

Enforce typed collections and parent context binding by validating inputs and ensuring correct binding of parent context like guild_id or channel_id whenever modifying how repositories fetch or persist data in src/Discord/Repository.

When do I need to validate endpoint templates and cache policies for DiscordPHP repositories?

You need to validate endpoint templates and cache policies for DiscordPHP repositories whenever you change how repositories fetch or persist data, ensuring boundaries and cache semantics remain aligned across the part family.

Does DiscordPHP support coordinating cache synchronization during REST mutations?

Yes, DiscordPHP supports coordinating cache synchronization during REST mutations by applying cache coherence policies that keep client state consistent across typed repositories and their corresponding API routes.

What are the limitations of manually managing cache and routes in DiscordPHP repositories?

Manually managing cache and routes risks drift between in-memory state and the API if repository boundaries are not enforced, potentially causing inconsistent client state during REST interactions across the part family.