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
Anyone building caches or a similar stores where it makes sense to add a time to live to the entries would benefit from this. Also a way to refresh the expiration would be nice if one wants to delete things that have been inactive for a determined amount of time.
The text was updated successfully, but these errors were encountered:
This is one of the more common feature requests that I don't believe is something that should be included in the core of sled itself.
The reason is that it adds significant space and compute overhead. Even if it's just one extra byte for a non-present expiration when every key is stored on disk, that could still be quite a significant cost at higher scales. When keys are known to be temporary, the effort to evict them can be pretty expensive. Only a small subset of use cases benefit from expiring keys, and I feel it's more appropriate to implement this as a layer on top of sled by adding your own optional timers as a prefix or suffix to your values. You can use IVec::subslice to avoid copying the rest to a new vec or something for use in your application.
Anyone building caches or a similar stores where it makes sense to add a time to live to the entries would benefit from this. Also a way to refresh the expiration would be nice if one wants to delete things that have been inactive for a determined amount of time.
The text was updated successfully, but these errors were encountered: