daravel_redis 1.14.0
daravel_redis: ^1.14.0 copied to clipboard
Redis and Valkey for Daravel across servers. Cache, locks, one-round-trip rate limits, queues without polling and broadcasting between servers.
Changelog #
1.12.0 #
- First release:
withRedis(), a RESP client (RedisClient,RedisScript, Pub/Sub),RedisStore(cache, Laravel-compatible locks, one-script rate limits),RedisQueue(BLPOPwake-up), broadcasting between servers (RedisBroadcastRelay,RedisChannelState), theRedisfacade and aredisreadiness check. - Sentinel (
RedisMode.sentinel,redis+sentinel://: master discovery,ROLEcheck,READONLYresent after a failover) and Redis Cluster (RedisClusterClient,redis+cluster://: slot map,MOVED,ASK,TRYAGAIN, keys of several slots split forMGET/DEL/UNLINK/EXISTS/TOUCH,SCANon every master);redisHashSlot;RedisClient.pipeline,scan,stats. TieredStore(CACHE_STORE=tiered): an L1 per isolate kept exact byCLIENT TRACKING ... BCAST(RedisInvalidations), on one server or a cluster.RedisQueueEngine.stream(QUEUE_REDIS_ENGINE=stream): a stream with a consumer group,XAUTOCLAIMfor jobs whose worker died.RedisSerializer.php(REDIS_SERIALIZER=php) andPhpSerializer: cached values as Laravel'sserialize(), read either way.RateCounterStoreonRedisStore:Limit.slidingWindow()andLimit.gcra(), one script each on the server's clock.redisCommands(package:daravel_redis/commands.dart):redis:ping,redis:stats,redis:keys-audit,redis:cli(read-only unless--write),redis:inspectwith the MCP toolredis_inspect,cache:prune-stale-tags.RedisStore.tags(RedisTaggedCacheStore, Laravel 12's keys and tag lists) andflushStaleTags;TieredStoretags with tag ids.Redis.throttleandRedis.funnel(RedisDurationLimiter,RedisConcurrencyLimiter,LimiterTimeoutException), Laravel's scripts and keys.- Sharded Pub/Sub:
publish(..., sharded: true),subscribe([...], sharded: true), following its slot in a cluster. Redis.events(channel)(RedisEventStream): server-sent events kept in a stream, resumed fromLast-Event-ID.