# `Selecto.Performance.QueryCache`

High-performance query result caching for Selecto.

Provides intelligent caching of query results with:
- Automatic cache key generation from SQL and parameters
- TTL-based expiration
- Size-based eviction (LRU)
- Cache invalidation strategies
- Cache statistics and monitoring
- ETS-backed low-latency reads

# `cached_execute`

Execute a query with caching.

This is a convenience function that checks cache, executes if needed,
and caches the result.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `clear`

Clear entire cache.

# `generate_key`

Generate a cache key from Selecto query.

# `generate_key_from_sql`

Generate a cache key from SQL and parameters.

# `get`

Get a cached query result.

Returns {:ok, result} if found, :miss if not in cache.

# `invalidate`

Invalidate cache entries by key or pattern.

# `invalidate_by_tags`

Invalidate cache entries by tags.

# `put`

Store a query result in cache.

## Options

- `:ttl` - Override default TTL for this entry
- `:tags` - Tags for cache invalidation
- `:compress` - Force compression for this entry

# `start_link`

Start the query cache process.

## Options

- `:max_size` - Maximum number of cached queries (default: 1000)
- `:default_ttl` - Default TTL in milliseconds (default: 5 minutes)
- `:eviction_policy` - :lru, :lfu, or :ttl (default: :lru)
- `:cache_backend` - :ets (default: :ets)
- `:track_stats` - Enable cache statistics (default: true)
- `:compression` - Enable result compression (default: false)

# `stats`

Get cache statistics.

# `warmup`

Warm up cache with frequently used queries.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
