Handler socket and query cache
After our tests, we found that update the table with HS will not invalidate the query cache, did we miss something or that's the result?
Invalidating the query cache is not implemented yet.
that will be a feature in the future? :-)
I want to implement it in the near future.
it's great to know that, wish HS will be more powerful and popular ^_^
I'm working on various HandlerSocket components for django framework (http://bitbucket.org/dchaplinsky/django-hs-cache, http://bitbucket.org/dchaplinsky/django-hs-sessions) and also started to implement monkey patch for django ORM which will route all suitable requests via HandlerSocket.
Absence of query cache invalidation is causing some problems when I'm mixing usual requests via mysql bindings with handlersocket ones. Do you have any ETA for this feature?
Thanks
dchaplinsky,
Thanks for those django-handlersocket projects. This is great!
I'm particularly interested in your patched Django ORM. Where can I find it? What types of requests are routed through HandlerSocket? Can it route inserts and updates to HandlerSocket?
Thanks.
At the moment, it's on proof of concept stage. I already did the part which finding appropriate selects, made via ORM, inserts and updates should be even easier. I will continue work on this weekends. But as you may understand, without query cache invalidation it just won't work. Actually, I disabled culling in hs-cache backend because of this, since it requires some SQL and when I'm doing select count(*) from it just returning zero all the time.
That's essential part of finding select requests suitable for HS https://gist.github.com/669070
Great! Please keep me posted about your progress. Perhaps you could start a project on the HS-enabled ORM?
About query cache -- if you turn off query cache on MySQL then everything should work fine, right?
Many people recommend turning off MySQL query cache anyway because in a heavily loaded server, any time you insert/update a table, the entire query cache needs to be invalidated. All that thrashing of the query cache ends up making MySQL slower instead of faster.
I will try just to ensure if the problem is in query cache.
As you may understand, such components should work with any mysql settings.
Regarding django ORM patch — I will start the project, once I will have working prototype.
The latest version of HandlerSocket invalidates the query cache if data is modified. Please try.
Hi,
Is there any ETA on when HS will invalidate query cache when new data has been added to the table? Should I open a new ticket for this?
What is ETA?
Estimated Time of Arrival, as in, do you expect this feature/issue to be finished anytime soon?
Query cache invalidation was added back in January, as you can see in the comment just above yours.
Yes, but as far as I could see, it was only implemented for updates, not for new writes/inserts, am I correct?
Nope, should work for inserts, updates and deletes. I think invalidating the query cache against just updates would probably be a lot more work :p
WheresWardy is correct.