张剑平/频率

使用redis实现限制系统

v1.0 2018-10-16 09:59 UTC

This package is not auto-updated.

Last update: 2024-09-26 11:28:42 UTC


README

  • 1. 配置src/config下的redis.php为自己的redis环境
  • 2. 配置src/config下的frequency.php
    • 格式为:
        'testProject' => [
          'prefix' => 'testProject',  // 封禁名称
          'time' => 20,  // 每秒允许访问1次
          'limit' => 1
        ]
      
  • 3. 使用方式参考test.php