/** * @param string $script * @param string $sha1 * @param string[]|null $keys * @param string[]|null $args * @return mixed * @throws ErrorResponseException */ protected function execLua($script, $sha1, $keys = null, $args = null) { try { return $this->Redis->evalsha($sha1, $keys, $args); } catch (ErrorResponseException $Ex) { if (0 === strpos($Ex->getMessage(), 'NOSCRIPT')) { return $this->Redis->eval($script, $keys, $args); } throw $Ex; } }