strapi-community / strapi-plugin-rest-cache

Speed-up HTTP requests with LRU cache.
https://strapi-community.github.io/strapi-plugin-rest-cache/
MIT License
129 stars 29 forks source link

get Keys for redis cache does not work #14

Closed talabatyMomin closed 2 years ago

talabatyMomin commented 2 years ago

When the "prefix" value comes in as "undefined" it is added to the query for keys and it returns an empty array becuase there is no key with the name "undefined{{the-rest-of-the-key}}".

currently added a customer provider with the fix

async keys(prefix) { return prefix ? this.cache.keys(${prefix}*) : this.cache.keys('*'); }

stafyniaksacha commented 2 years ago

Hey @talabatyMomin

Thanks for reporting the issue, I just released a patch 4.2.2, can you confirm it solves your issue ?

talabatyMomin commented 2 years ago

Thanks @stafyniaksacha it is working now in the patch.