+
Skip to content

v9.1.1

  • v9.1.1
  • c52e4fd
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
  • Choose a tag to compare

  • v9.1.1
  • c52e4fd
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@danehammer danehammer tagged this 14 Jan 12:55
* add failing test for allowN increment of zero

* fix lua script to allow increment by zero (effectively peek)

In past versions of redis_rate, you could peek at the current state
in the redis limiter by calling allowN but not incrementing. The
move to lua script did not preserve this (unadvertised) ability.

This adds it back, the only issue was trying to SET a redis
row with an expiry of zero if the row didn't exist. Since the
caller doesn't want to increment at all, this changes the SET
to not be called if the value is absent.

* same test and fix for allowAtMost increment by zero

* add test for peeking after a write
Assets 2
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载