mitirrli/redis-tools

固定大小的redis队列、分布式锁

v2.1.1 2020-05-07 06:50 UTC

This package is auto-updated.

Last update: 2024-11-07 16:57:20 UTC


README

🌈 基于redis的一些组件

Total Downloads Latest Stable Version Latest Unstable Version License

固定大小的redis队列

$Lock = new \Mitirrli\Queue\Queue(['key' => 'test', 'lLen' => 10]]);

$Lock->toList('a');

redis分布式锁

$Lock = new \Mitirrli\Lock\Lock(['key' => 'test']);

//业务逻辑占用锁
$Lock->lock();

//解锁
$Lock->unlock();