Hi tabboy. You can’t turn off relationship caching. That cache is absolutely necessary for relationships in order to provide too reduce the performance hit. Also note, unlike other forms of caching EE does, ‘relationship cache’ refers to data stored in the database- it’s a bit different than any of the other forms of caching.
This honestly sounds like a CartThrob issue - IF the default way it stores inventory is by using relationships or reverse relationships. Now if it’s something custom you’ve done yourself, not as much. But EE is doing exactly what it’s supposed to be doing with regard to relationships.
That said- the fix should be fairly simple- when that inventory number in the database is updated? It needs to clear the relationship cache- preferably the cache for only the entry involved. If CartThrob is using the relationships to hold inventory? And it’s allowing that to be shown front end- it really needs to clear out that relationship record. If it’s something you’ve custom coded- then what would be nice is if there’s a hook in CartThrob that allows you to write an extension and do it yourself.
But yes- fix should be fairly easy, but it needs to happen in either CartThrob code or a hook in CartThrob code.
If I knew the code, I’d offer a pointer. I don’t- but am more than happy to noodle on it with someone who does know CartThrob. I can lay out what needs to happen to the relationship table if that’s any help.