laravel version: 5.5.36
redis version: 3.06
when I refer to predis in a laravel project, I have no problem in the local windows environment, but I have a problem in the production environment.
my code is as follows:
public function getPhoneCode()
{
Cache::rememberForever("getAllPhoneCodeMultiViewData", function () {
return Area::where("status", 1)
->whereIn("level", [2, 3])
->orderBy("pinyin", "asc")
->get(["id", "english_name", "chinese_name", "iso2", "area_phone_number", "pinyin"]);
});
return Cache::get("getAllPhoneCodeMultiViewData");
}
the cache configuration uses the redis, production environment to report errors as follows:
exception=PredisResponseServerException
file=/bcc/production/BCCKidV1.0/vendor/predis/predis/src/Client.php
line=370
message=ERR unknown command "EVAL"
class: "PredisClient"
file: "/ bcc/production/BCCKidV1.0/vendor/predis/predis/src/Client.php"
function: "onErrorResponse"
line: 335
type: "- >"
excuse me, what"s going on? My redis is on 2.6