cheprasov / php-redis-client

RedisClient is a fast, fully-functional and user-friendly client for Redis, optimized for performance. RedisClient supports the latest versions of Redis starting from 2.6 to 6.0
MIT License
127 stars 41 forks source link

Fixing large string issue #45

Closed BrianFranklin closed 8 years ago

BrianFranklin commented 8 years ago

fread() returns up to the $length specified. I was hitting an issue where large strings (eg, cached rendered pages ~20,000 bytes) would get truncated on reads in random spots, and successive reads would fail with unknown error codes. I tracked it down to this method. Since large data may not stream in time for fread() to pick it up all at once, the function was retuning partial data and the next read would get random gibberish from wherever the previous one had cut off.

cheprasov commented 8 years ago

@BrianFranklin Thanks a lot. I approved, but I will add some changes.

cheprasov commented 8 years ago

I created new version 1.5.1 with bugfix.