What did the nut chasing the other nut say?
I like the idea behind this, couple of questions about it:
I’ve been using it mostly in single consumer mode or they were spaced apart in time so concurrency was never an issue. I did discover some concurrency issues and just fixed them and released new version.
So it should work correctly now, and worst case is if two concurrent processes have mismatched cache and want to start writing – in that case one of them ‘wins’ and updates the cache and another one simply calls the function without modifying the database.
I’ve never thought of it, however, I can see how it could be useful!
Should be relatively straighforward: the bit responsible for converting into sqlite-compatible row is separated from code actually dealing with sqlite. So it would be a matter of providing different primitive type mapping (in redis everything is a string iirc?) and implementing transactional logic for Redis (which I’m less familiar with than sqlite).
Awesome great. For sure will take a closer look and use your project when I can.
Created this issue from our conversation: https://github.com/karlicoss/cachew/issues/9
Short of bandwidth at the moment but if one day I have some time will contribute above to your project if you don’t get to it first :-)