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
The read cache-aside pattern pops up often enough, but right now the implementation is sequential, which slows things down a bit. In the case where the data is not in the cache, once it's retrieved from its source, it would be nice for the process of caching not to block the user from starting to use the data immediately.
So instead of the current (see mk_memoizer in caching.py):
...
cache_store[k] =val# cache itreturnval
we'd like
...
async_this('cache_store[k] = val') # cache it asynchronouslyreturnval
Could be very easy, but need to think about what this could cause, and if the potential "harm" is important. For example:
Thinking we don't have the data in the cache because it's not finished writing, and therefore asking for the data from the source again: Not a big "harm".
Thinking we have data in the cache (because we see the file exists), but the data didn't finish writing, and therefore we get corrupt data... That could be harmful, and we'd like to avoid that. But how do we do so with any cache store that is given to us. Possible solution: A store wrapper that adds some safe async stuff on writes. So more like this solution:
...
async_cache_store=async_this(cache_store) # wraps a store so it writes asyncly
...
cache_store[k] =val# will write asynchronouslyreturnval
The text was updated successfully, but these errors were encountered:
The read cache-aside pattern pops up often enough, but right now the implementation is sequential, which slows things down a bit. In the case where the data is not in the cache, once it's retrieved from its source, it would be nice for the process of caching not to block the user from starting to use the data immediately.
So instead of the current (see
mk_memoizer
incaching.py
):we'd like
Could be very easy, but need to think about what this could cause, and if the potential "harm" is important. For example:
The text was updated successfully, but these errors were encountered: