nette/caching
High-performance caching library from Nette. Provides flexible cache storage backends, automatic expiration, dependency-based invalidation, and easy integration for PHP apps. Ideal for speeding up responses and reducing database or API load.
IStorage interface, which lacks critical Laravel-specific features like cache tags, event-driven invalidation, and PSR-16 compliance (despite PSR-16 adapter added in v3.3.1, it remains untested for Laravel’s Repository contract).Illuminate\Support\Facades\Cache compatibility or Laravel’s CacheServiceProvider means manual shimming is required, increasing maintenance overhead.Repository contract expects methods like get(), put(), tags(), and forever(), while Nette’s Cache class uses load(), save(), and clean(), forcing a custom adapter layer that defeats the package’s "easy-to-use" value proposition.CacheManager, CacheRepository, or CacheTagger) means teams must:
Nette\Caching\Cache ↔ Illuminate\Contracts\Cache\Repository.Cache::tags() logic.CacheStoredEvent) for consistency.Illuminate\Contracts\Cache\Store, while Nette’s IStorage is incompatible, requiring manual binding in Laravel’s service container.NOASSERTION license remains unresolved, posing enterprise adoption barriers.FileStorage) lacks Laravel’s optimized disk caching (e.g., file driver with cache/ directory).predis or phpredis integration).Redis, Memcached, and database drivers are battle-tested; reinventing them with Nette’s backends introduces unnecessary complexity.NOASSERTION license acceptable for our stack?
CacheManager, CacheRepository) means manual integration is required.Option 1: Abandon Laravel’s Cache System (Not Recommended)
Illuminate\Cache\CacheManager with a custom Nette-based adapter.Cache to Laravel’s CacheRepository.NetteCache::get(), NetteCache::put()) to mimic Laravel’s API.Option 2: Hybrid Approach (Partial Adoption)
array or file driver).Cache as a secondary cache store (e.g., for template caching).load()/save()).Option 3: Reject and Use Laravel’s Native Cache (Recommended)
Illuminate\Cache, which is:
Illuminate\Contracts\Cache\Repository.Illuminate\Cache\CacheManager.Illuminate\Support\Facades\Cache.Cache::tags()).If proceeding with Option 1 (Full Replacement):
array driver).Cache::tags() and cache events.Cache:: usages in the codebase.Risks at Each Phase:
load() vs. get()).How can I help you explore Laravel packages today?