{"repo":"kai-init/laravel-normcache","free":true,"listed":false,"github":"https://github.com/kai-init/laravel-normcache","clone":"git clone https://github.com/kai-init/laravel-normcache.git","description":"A normalized Redis cache for Laravel Eloquent. Self-invalidating, Redis-backed.","language":"PHP","stars":96,"topics":["cache","eloquent","laravel","octane","query-caching","redis","redis-cluster","laravel-package"],"license":"MIT","category":"databases-storage","readme_excerpt":"Laravel Normcache Normalized, self-invalidating Redis caching for Laravel Eloquent. Normcache caches model-query results as ID lists and stores model attributes in versioned model keys. When a model changes, Normcache bumps a version key instead of scanning and deleting every query that may have returned that model. Requirements: PHP 8.2+, Laravel 12/13, Redis 6.0+ Table of Contents - Installation - What's new in v3 - Usage - Invalidation - Cache spaces - Configuration - Bypasses and limitations - Observability - License Installation Add Cacheable to models you want Normcache to manage: What's new in v3 Redis Cluster sharding is now fully atomic within each cache space. Normcache keeps the keys for a cached operation and its valid dependencies in one hash slot, so cache reads, rebuilds, and invalidation coordination remain atomic. - Cache spaces: declare $normCacheSpaces on a model and select a declared space with - space() when needed. - Space-targeted flushing: use NormCache::flushAll('space') or php artisan normcache:flush --space=... . - Named table dependencies: dependsOnTables() works in named spaces and is invalidated with invalidateTableVersion() . - Upgrade from 2.4: run php artisan normcache:flush before deploying v3 to clear legacy cache keys. Usage Normal Eloquent reads are cached automatically for cacheable models: Use withoutCache() or ttl() per query: Cross-table queries Simple whereHas / whereDoesntHave constraints on cacheable relations and plain string joins","default_branch":null,"files":null,"tree":[],"storefront":"/r/kai-init","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kai-init/laravel-normcache/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}