1. 8
  1. 3

    What did the nut chasing the other nut say?

    I’ma cashew.

    1. 2

      I like the idea behind this, couple of questions about it:

      1. If my python service is scaled to run on multiple containers how well will this work across containers with sqlite?
      2. Are there any plans to support redis as the store?
      1. 2


        1. 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.

        2. 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).

        1. 2

          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 :-)