Metadata-Version: 2.4
Name: cloud_dog_cache
Version: 0.2.3
Summary: Platform caching package for LLM and tool call results
Author: Cloud-Dog, Viewdeck Engineering Limited
License-Expression: Apache-2.0
License-File: LICENCE
License-File: LICENSE
License-File: NOTICE
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Provides-Extra: redis
Requires-Dist: redis>=5.0; extra == 'redis'
Description-Content-Type: text/markdown

---
template-id: T-PKG-RME
template-version: 1.0
applies-to: README.md
registry: package
---

# cloud_dog_cache

Platform caching package for LLM and tool call results.

## Quick Start

```python
from cloud_dog_cache import cached, init_cache, CacheConfig

# Initialise
init_cache(CacheConfig(enabled=True, backend="memory", ttl_seconds=3600))

# Decorate async functions
@cached(ttl=3600, invalidate_on=["context_rebuild"])
async def generate_sql(query: str, context_hash: str) -> str:
    ...
```

## Backends

- `memory` (default) — In-memory LRU with configurable max entries
- `redis` — Redis-backed with tag-based invalidation

## Invalidation

- TTL-based expiry
- Event-based: `invalidate_event("context_rebuild")`
- Manual: `await manager.flush()`
