Open mapcentia opened 2 months ago
The Redis driver's function to read all keys has been streamlined.
Where did you see that ? From which version ? Backward compatibility must be ensured if this is a very recent change of Redis extension.
I'm sorry for the not so good PR comment. By Redis driver's function to read all keys
I mean the method driverReadAllKeys
of lib/Phpfastcache/Drivers/Redis/Driver.php
I just read this in the docs:
It is important to note that the MATCH filter is applied after elements are retrieved from the collection, just before returning data to the client. This means that if the pattern matches very little elements inside the collection, SCAN will likely return no elements in most iterations. An example is shown below:
I now understand the purpose of this PR. I'll check it asap.
The Redis driver's function to read all keys has been streamlined. The change is adding a loop to scan and merge the keys iteratively. This ensures that the function will work correctly, even when the number of keys scanned exceeds the MAX_ALL_KEYS_COUNT.
Proposed changes
This is a fix for https://github.com/PHPSocialNetwork/phpfastcache/issues/912
Types of changes
What types of changes does your code introduce to Phpfastcache?
Agreement
I have read the CONTRIBUTING and CODING GUIDELINE docs