HOW-TO:Share libraries using MySQL: Wiki Edition
@Milhouse, about a year ago I posted about the problems I faced with Kodi caching results of slow queries on https://forum.kodi.tv/showthread.php?tid=313580, where Kodi didn't invalidate caches correctly. On that thread, @Koying tried to help but unfortunately misunderstood the problem, but since you seem to be interested in the MySQL stuff, I am tagging you here to get some traction.

The short version:
Prior to Kodi 17, even though the code existed to cache the results of slow queries, for some reason, no cache was ever created and as a result no one noticed this bug in the older versions.
When an episode is watched, the episode list cache gets invalidated, but caches for the season list and TV shows list don't get invalidated and as a result show stale and incorrect data for a long time. Similarly if a movie is explicitly refreshed, Kodi removes the old row of data in the database and creates a new one, and because it doesn't invalidate the cache, the wrong information is displayed.

I tried to work on a fix and raise a PR but sadly setting up the dev environment is a herculean task which I haven't been able to successfully do. Hope the info I gave makes enough sense for you to look into it.

Refs:
https://trac.kodi.tv/ticket/17336 <-- TV Shows watching
https://trac.kodi.tv/ticket/17536 <-- Movie refreshing
Reply


Messages In This Thread
RE: HOW-TO:Share libraries using MySQL: Wiki Edition - by AMoo-Miki - 2018-04-18, 11:31


Logout Mark Read Team Forum Stats Members Help
HOW-TO:Share libraries using MySQL: Wiki Edition2
This forum uses Lukasz Tkacz MyBB addons.