Download the PHP package mitirrli/redis-package without Composer

On this page you can find all versions of the php package mitirrli/redis-package. 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 redis-package

Redis package

Total Downloads Latest Stable Version Latest Unstable Version License

A simple redis packages.

Installation

Redis Distributed lock

业务逻辑加锁,防止同时操作同一数据

App::setRedis()

若不使用默认配置,可以注入redis对象,返回App对象本身。

App::Lock()

获取Lock对象,同时传入配置项(设置锁的名字,默认加锁时间为10分钟,key为必传项)

设置加锁时间为1000秒。

lock()

进行加锁操作,加锁结果以布尔值返回。

unLock()

进行解锁操作,解锁结果以布尔值返回。

Redis Fixed Array

固定大小的数组,元素塞满后,会pop之前的元素,可用于轮播数据等。

App::FixedArray()

获取FixedArray对象,同时传入配置项(设置key的名字,key为必传项)

设置元素数目20个。

toList()

往数组中加入数据,最后返回数组元素的数目。

lLen()

获取数组元素的数目。

getItemByIndex()

根据数组索引获取数据,下标从0开始,如果没有对应值会抛出异常。

Redis Sort Set

固定大小的有序集合。

App::FixedSortSet()

获取FixedSortSet对象,同时传入配置项(设置key的名字,key为必传项)

设置集合数目20个。

toList()

往集合中加入数据。

getByIndex()

获取指定下标的数据(数据由大到小)。


All versions of redis-package with dependencies

PHP Build Version
Package Version
Requires ext-redis Version *
phpunit/phpunit Version ^7
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 mitirrli/redis-package contains the following files

Loading the files please wait ....