Download the PHP package msmm/hyperf-redis-lock without Composer

On this page you can find all versions of the php package msmm/hyperf-redis-lock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hyperf-redis-lock

hyperf-redis-lock

一个简单的Redis分布式锁的实现 基于Hyperf框架。本扩展实现了基本的分布式锁,支持阻塞式分布式锁和非阻塞式分布式锁。

fork 自 Lysice/hyperf-redis-lock, 在其基础上支持 Hyperf ^3.1

原理

Redis的命令为原子性 使用Redisset即可保证业务的串行执行。 2.8之前版本的Redis不支持setex选项 因此只能使用 setnx+expire的方式。 对应扩展1.0版本. 2.8之后版本的Redis可以直接使用 setnx+ex选项。对应扩展2.*版本

因此 2.版本只支持2.8版本以后的Redis 1.版本支持所有版本的Redis.

确认你的Redis版本 如果你的Redis低于 2.8版本 则set 命令不支持 ex选项 因此你需要安装1.0版本。

redis-server --version

安装

注意:请根据你的Redis版本

使用

首先需要在程序内初始化你需要的 redis


All versions of hyperf-redis-lock with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
hyperf/redis Version ^3.1
hyperf/stringable Version ^3.1
hyperf/support Version ^3.1
ext-redis Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package msmm/hyperf-redis-lock contains the following files

Loading the files please wait ....