Search by

semitexa / cache

syntaxwanderer

Semitexa Cache - tenant-aware cache store (array by default, optional Redis), namespaces, and tag invalidation

Package info

github.com/semitexa/semitexa-cache

Type:semitexa-module

pkg:composer/semitexa/cache

Statistics

Installs: 732

Dependents: 3

Suggesters: 0

Stars: 1

Open Issues: 0

2026.10.15.2225 2026-10-16 02:10 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)
  • RedisCacheStore with Predis backend (CACHE_DRIVER=redis)
  • Tenant-aware key namespacing via CacheNamespaceResolverInterface
  • Tag-based invalidation with TagSet
  • CacheStoreInterface contract for custom backends
  • Console: cache:flush, cache:forget, cache:tags:flush