semitexa / cache
Semitexa Cache - tenant-aware cache store (array by default, optional Redis), namespaces, and tag invalidation
Requires
- php: ^8.4
- predis/predis: ^2.0
- semitexa/core: >=2026.10.15.2225 || dev-master
Requires (Dev)
- phpunit/phpunit: ^10.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 2026.10.15.2225
- 2026.10.08.0620
- 2026.09.27.0404
- 2026.09.23.1717
- 2026.09.13.1330
- 2026.09.13.0749
- 2026.08.04.2028
- 2026.07.23.0617
- 2026.07.06.1438
- 2026.06.25.0819
- 2026.06.25.0809
- 2026.06.21.0352
- 2026.05.08.1640
- 2026.04.15.0921
- 2026.04.05.0855
- 2026.04.03.1349
- 2026.04.03.1240
- v1.0.4
- 1.0.3
- v1.0.2
- dev-develop
- dev-review/package-metadata-20260323
This package is auto-updated.
Last update: 2026-10-16 02:12:35 UTC
README
Tenant-aware cache store with pluggable drivers (in-process array by default, optional Redis), namespace isolation, and tag-based invalidation.
Install
Included in every project created by the installer (https://semitexa.com/install.sh).
Purpose
Provides a cache abstraction with pluggable backends, selected by CACHE_DRIVER (array or redis, default array). Stores support key namespacing for tenant isolation, tag groups for batch invalidation, and TTL-based expiration.
Role in Semitexa
Depends on semitexa/core. The default array driver is per-worker and coroutine-safe. CACHE_DRIVER=redis shares the cache across workers; each operation borrows an exclusive connection from a coroutine pool, so it is safe under Swoole (RedisTagIndexCoroutineTest guards it). An unreachable Redis is a cache miss, not an error. Becomes tenant-aware when paired with the Tenancy package via CacheNamespaceResolverInterface.
Key Features
ArrayCacheStore(default,CACHE_DRIVER=array)RedisCacheStorewith Predis backend (CACHE_DRIVER=redis)- Tenant-aware key namespacing via
CacheNamespaceResolverInterface - Tag-based invalidation with
TagSet CacheStoreInterfacecontract for custom backends- Console:
cache:flush,cache:forget,cache:tags:flush