This repository has been archived by the owner on Mar 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Cached value sometimes invalid #52
Comments
After further investigation it seems like first cached result is always returned in this case. Here is a test code with 100% reproduction:
Tested like
Results
As stated before, everything works as expected when removing Cacheable() from the query. |
Fixed it via #e088162 |
Seems to be working, nice! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related problems. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Sometimes when using cache with parameters returns incorrect data.
Sometimes I get empty list and sometimes partial results (missing items in list). During the lifetime of the app this data is never changed and definitely is available in the database. If error occurs, it fixes itself when updating the data from database next time even though the data has not changed!
If I remove Cacheable() the code works. If I remove the Where-clause (just cache all items) the code works.
This code is run with different currencyIds so I suspect some kind of cache collision; for conditions X you get data for conditions Y.
Dependencies:
Edit: tested also with 2.6.3 and problem persists
It seems to be an issue with having
List<T>.Contains(...)
inside Where-clause. This is only case where I have had problems. Seems likeContains
does not leverage parameterization. Maybe its related to this?The text was updated successfully, but these errors were encountered: