Add purgeStorage to InMemoryStorage#162
Conversation
|
Hi @anullog, we personally do not think this is the way to go because you may be purging the |
|
Hi @mbrandonw, thanks for the insight! Just to add a bit more context on the PR — we’re running into two main issues with our app:
From what I can tell, the current API doesn’t support this directly. Would it make sense to update Happy to hear any alternative suggestions as well! |
|
@anullog That sounds like a more reasonable feature to us! We chatted about potential design and requirements, so if you'd like to take them on, here they are:
I believe this may require |
- add removeValue test - add removeValueShared test - add limited APIs
|
Hi @stephencelis, thank you for providing the design and requirements! So I've been playing around with this and made some progress. That said, I’m pretty sure the way I’m going about it isn’t the right approach. Right now, I’m mostly trying to surface the limitations and highlight where I’m getting stuck - accessing While the code and tests actually work, it feels clunky, but hopefully it shows where the pain points are. If you have any suggestions or ideas on how to approach this better, I’d really appreciate it! |
Adds a
purgeStorageAPI toInMemoryStoragethat allows clearing of allInMemoryKeydirectly through@Dependency(\.defaultInMemoryStorage).