-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing an item from a page resource also removes it from the cache #42
Comments
Can you share the code you have? |
something simple like this does it
as you see, the second call only returns 1181 items instead of the expected 1281 as removing them from the "pokemon" list seems to also remove them from the cache edit: i have no idea how to get this to format properly. Sorry |
you put |
you can also fix the cache issue by just cloning the lists before removing items from them. so then you're removing items from the clone list instead of the cached list. but that doesn't solve the underlying issue |
So i have a method that gets all pokemon from pokeapi using a call to GetNamedResourcePageAsync and then loops over the results and removes any results that do not match a given filter. When I call GetNamedResourcePageAsync again, instead of all pokemon being returned, only the pokemon that were left after the previous filter are left.
It seems like removing items from the results list is also removing them from the cache
The text was updated successfully, but these errors were encountered: