Closed vesper8 closed 5 years ago
Hi @vesper8, sorry for the delay in my response (I have been tied up in other projects).
I think this could be an issue with how the keys are generated. I will double-check that the relationships also include the database information.
thank you, please let me know what you find out, in the meantime I've had to disable the package but I would really like to use it again
@vesper8 Still thinking about how to implement this. This is not actually a bug, but intended functionality, but I see how this could break things. Basically what we would need to do is have a switch that eliminates the database from being tracked in the cache keys. I'll try to add this in a way that works with the default functionality, but lets you override it if needed.
great! I understand that it's an edge case.. not many people are in my situation dealing with a single project that uses 5 different databases. Would be great if you could make it work without breaking anything : ) thanks!
@vesper8 Give 0.6.1 a try and let me know how it goes.
I recently converted one of my projects that was using a single database to using multiple databases. However this is not because of multi-tenancy it's more of an organizational preference
I read this
which I think is causing me a problem. Not sure what to make of it. I have relationships that cross database connections. For example one DB has a users table and that user has relationships with models in other databases. Ever since moving to multiple databases, the cache is no longer cleared when I insert new items, previously it was working fine
I tried adding a single shared prefix on my "CachedModel" class that all my models except my User model extend
But that didn't resolve my issue.
Would appreciate some guidance on how to make this work. Thanks!