Closed unicornsleuth closed 3 years ago
Date | Activity | Time Spent |
---|---|---|
03/219/2021 | Testing Bug issue | 20 mins |
03/21/2021 | Researching Solutions | 1 hour |
03/22/2021 | Testing Solutions | 2 hours |
03/23/2021 | Testing deployment | 1 hour |
03/24/2021 | Creating PR | 30 mins |
How to Test :
Run DELETE request and refresh Cache and the data should be deleted. Same with PUT Request
Description: Fixed the parameter bug in the PUT method. Took r (redis conneciton) out of the PUT method parameters. Solving the issue. Fixed the delete cache issue by changing the parameters in the invalidate function. Added the parameters key, userId, and taskId. Added the function call in the main where the PUT and DELETE functions are called.
Describe the bug A PUT request fails to update, because of a bug in the code - expects 3 positional arguments, but receives 4 After I quickly/temporarily made this fix, I found that a PUT (and also patch, delete) does not invalidate the particular cache for that task.
To Reproduce Steps to reproduce the behavior:
Expected behavior You should see "Error: update() takes 3 positional arguments but 4 were given"
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
To Reproduce 2nd Part
Additional context We should have a cache for each task that has been queried, of the form "users:{userId}:tasks:{taskId}" The caches are being created for these, but they are not being cleared when PUT/PATCH/DELETE is run on the task. The code needs to be reworked to invalidate those particular caches as well as the "users:{userId}:tasks" cache on each update.