-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Is your feature request related to a problem? Please describe.
The current implementation of getMultiple
on Phalcon's Redis Cache Adapter is using a loop to fetch keys individually. This makes multiple requests to the Redis server and decreases application performance by increasing latency to the Redis Server.
- PHP
- Zephir
cphalcon/phalcon/Cache/AbstractCache.zep
Line 202 in 83677f1
protected function doGetMultiple(var keys, var defaultValue = null) -> array |
Describe the solution you'd like
Remove the loop logic for getMultiple
and use PhpRedis's mGet
method.
https://github.com/phpredis/phpredis?tab=readme-ov-file#mget
Describe alternatives you've considered
N/A
Additional context
We store realtime pricing data in Redis with a sub 3 second TTL as the data is updated very frequently. To reduce complexity, the dataset is stored using distributed keys based on category / market. A simple request can fetch upwards of 200 individual items from Redis.
Using Phalcon implementation, reading is delayed by increased latency. Using PhpRedis mGet
performance is comparable to a single fetch.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status