When I used Alibaba Cloud's kvstore, it was a public beta at first and there was no charge. Later it became a commercial model and there was a charge. It cost 8 yuan an hour, which was too expensive, so I thought of deleting some useless data, but the amount of data It was too huge, and it was not possible to use keys * to match (using keys * will directly freeze your redis). Later I learned that scan can find all keys with a cursor, so I started tinkering with it (I found a lot of nonsense). .
Start drying. .
[codesyntax]
# git clone https://github.com/phpredis/phpredis # cd phpredis # /opt/php/bin/phpize # ./configure --with-php-config=/opt/php/bin/php-config # make && make install
[/codesyntax]
Pay attention to your php installation path
Restart the php-fpm program and it’s done. . .
Thanks for reading, I hope it can help everyone, thank you for your support of this site!
For more articles related to how the PHP redis extension supports the scan command, please pay attention to the PHP Chinese website!