Open twolfson opened 10 years ago
/cc @Raynos since he was on the initial comment thread
Ah, I realized why I avoided the addGetter
method. In the implementation, we have many keys that can mutate but maybe that is a problem we have to solve.
normal-key-with-hash-of-object-that-can-vary
// model-1-abcdee OR model-1-abcdef
As a result, it could lead to a lot of persisted methods when they are no longer needed =/
Bonus points: The normal-key
also varies on a per-user basis which adds even more to the redundancy.
As discussed in https://github.com/uber/request-redis-cache/pull/2/files#r12081163, there is room for improvement on the interface. We thought of adding to the constructor but that won't work since it will require an instance for every key. However, something that is more
observer-like
might work: