You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking at this as potential solution to replace the caching layer on one of my projects (ExpressBrute) which currently has a bunch of its own caching storage adapters that are a pain to maintain and don't make sense to tie to my specific project. It seems like we both need a way to use multiple different caching stores with a unified interface
The only trick is, I need a way to do more than just get, set anddelete. Specifically I need access to an atomic way to do increment, so that multiple process can increment a counter without losing updates. For example without atomic increments, two processes can request the current count (e.g. 1), both processes increment that count by one and then both processes update the count to the new value (e.g the count becomes 2, instead of 3).
So I guess my question is: do you define a set API for your cache storage engines to target right now? And how are updates to that API managed? It seems like we need something like accord or waterline, but for cache stores. I don't know if you're already doing that or if it's something you're interested in doing.
Obviously increment can polyfilled in a non-atomic way with a get and a set and it will work across all stores until they they update to support the atomic method 1 by 1. If the underlying store doesn't support atomic increments (redis, mongo, and memcached all do), then the polyfill can just be left in place and it's not a big deal.
Thoughts on how to proceed?
The text was updated successfully, but these errors were encountered:
Hey @BryanDonovan, great module.
I'm looking at this as potential solution to replace the caching layer on one of my projects (ExpressBrute) which currently has a bunch of its own caching storage adapters that are a pain to maintain and don't make sense to tie to my specific project. It seems like we both need a way to use multiple different caching stores with a unified interface
The only trick is, I need a way to do more than just
get
,set
anddelete
. Specifically I need access to an atomic way to doincrement
, so that multiple process can increment a counter without losing updates. For example without atomic increments, two processes can request the current count (e.g. 1), both processes increment that count by one and then both processes update the count to the new value (e.g the count becomes 2, instead of 3).So I guess my question is: do you define a set API for your cache storage engines to target right now? And how are updates to that API managed? It seems like we need something like accord or waterline, but for cache stores. I don't know if you're already doing that or if it's something you're interested in doing.
Obviously increment can polyfilled in a non-atomic way with a get and a set and it will work across all stores until they they update to support the atomic method 1 by 1. If the underlying store doesn't support atomic increments (redis, mongo, and memcached all do), then the polyfill can just be left in place and it's not a big deal.
Thoughts on how to proceed?
The text was updated successfully, but these errors were encountered: