-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardize Memory Cache API: Align delete operation with KV API #3553
base: mar/memory-cache-delete
Are you sure you want to change the base?
Conversation
@rts-rob did mention that while aligning on api in terms of method names/signature is good we shouldn't align on async vs sync. |
In the past we've discussed wanting this interface to be able to be backed by a colo-wide cache without having to change the calling code, in which case delete() would need to be async. But per the other thread I'm unsure if we should be adding this method at all. |
For clarity, we don't prefer or require sync over async, I was just trying to point out that we don't require it to be async to be match KV's API. Either implementation is fine for KV. |
+1 to having this return a promise if we add it at all. Doing so is going to give us the most flexibility with the implementation long term. |
} | ||
|
||
auto deleteSpan = IoContext::current().makeTraceSpan("memory_cache_delete"_kjc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very familiar with volatile cache/memory cache, but except for acquiring the lock in SharedMemoryCache::Use::delete_()
this looks like a mostly synchronous operation here right? Not sure if we should add a span here since we'd expect the operation to complete very quickly; we'd also need to add some internal plumbing to support/document the span.
The generated output of Full Type Diff |
No description provided.