Home > Backend Development > PHP Tutorial > PHP redis extension supports scan command implementation method

PHP redis extension supports scan command implementation method

高洛峰
Release: 2023-03-03 19:28:02
Original
1564 people have browsed it

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
Copy after login

[/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!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template