src/Throttlers/CacheThrottler.php
protected function hitRedis()
    {
        $lua = 'local v = redis.call(\'incr\', KEYS[1]) '.
               'if v>1 then return v '.
               'else redis.call(\'setex\', KEYS[1], ARGV[1], 1) return 1 end';

        $this->number = $this->store->connection()->eval($lua, 1, $this->computeRedisKey(), $this->time * 60);

        return $this;
    }
protected function hitRedis()
    {
        $lua = 'local v = redis.call(\'incr\', KEYS[1]) '.
               'if v>1 then return v '.
               'else redis.call(\'setex\', KEYS[1], ARGV[1], 1) return 1 end';

        $this->number = $this->store->connection()->eval($lua, 1, $this->computeRedisKey(), $this->time * 60);

        return $this;
    }
protected function hitRedis ( ) { $ lua = 'local v = redis.call(\'incr\', KEYS[1]) ' . 'if v>1 then return v ' . 'else redis.call(\'setex\', KEYS[1], ARGV[1], 1) return 1 end' ; $ this -> number = $ this -> store -> connection ( ) -> eval ( $ lua , 1 , $ this -> computeRedisKey ( ) , $ this -> time * 60 ) ; return $ this ; }
An atomic hit implementation for redis.

@return $this
An atomic hit implementation for redis .