-
Notifications
You must be signed in to change notification settings - Fork 227
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
Invalidation and case insensitive #231
Comments
Cacheops was never designed to work with case-insensitive text. It could be made to work, solution will require user to specify custom handling of certain fields manually. I should say that I am not interested in solving this particular case at all. However, this could be possibly implemented in a bigger context of custom field transformations, in importance of which I am not sure either. The idea is to allow user to transform field values used both in invalidation and DNF with arbitrary functions. This can be used to support custom fields and types, truncate dates and longer texts, even invalidate by interval queries. This requires futher discussion and preferrably more interested people. |
So in above testcase, the one object is actually cached as 2 separate instances (TEST and test)? To "fix" the issue I could make sure that query parameters are always send as lowercase right? |
I think the issue here is that invalidation uses uppercase, which it got from db, but query uses lowercase. Thus You can read on how cacheops works here - http://hackflow.com/blog/2014/03/09/on-orm-cache-invalidation/ |
P.S. yes, using the same case everywhere will help. |
Thanks, I guess that's what I should look into now. Feel free to close this issue, as I understand it would take a lot of work to get this working, or leave it open as you said since perhaps more people would be interested in this |
I have a MySQL database with the collation set to utf8_general_ci (which is case insensitive)
I'm not a 100% sure, but it looks like invalidation isn't triggered correctly in some cases.
The following testcase should succeed if I understand how invalidation works, but it fails:
The text was updated successfully, but these errors were encountered: