Memoize doesn't give correct results with list as one of the parameter in API
ashsharma96 opened this issue · 6 comments
Hey Flask Caching Team,
When I tried to apply memoize decorator on one of my api which requires different parameters then its not giving right results.
For Example these are my api parameters:
{
"Id": 11082,
"Type": "QA",
"stores":[1234, 2345, 3456, 4567]
}
Function returns :
Total Customer: 3000
Decorator I used for above parameters are:
@cache.memoize(timeout=30)
Configuration I used:
config={'CACHE_TYPE': 'SimpleCache'}
stores key in parameters takes a list which can take one or more than one numbers. For example when I use above mentioned parameters I get number of customers in these stores but lets say I reduce the parameters to below parameters:
{
"Id": 11082,
"Type": "QA",
"stores":[1234]
}
It should return result shared below:
Total Customer: 900
But for 30 seconds it shows 3000 and after 30 seconds it shows 900 customers. So is there are any way by which memoize can determine like if there's any change in the list of parameters.
Environment:
- Python version: 3.7.6
- Flask-Caching version: 2.0.2
@sh4nks Can you please check this one. This one is urgent.
Regards
@sh4nks anything on this one. Little urgent.
@sh4nks Can you please look into this. Its Urgent.
@ashsharma96 I am sorry but I won't really have time for this. I have a full-time job, a family with a toddler so time is kinda precious for me! You can always investigate the issue yourself by checking out the repo.
@sh4nks Thanks for replying. I know everyone is busy but you are working on this library. That's why I asked you. Everyone have personal life. I just thought you may know this. Sorry to disturb you.
Hi @northernSage! Do you have free time for it?