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
It would be great to be able to update Redis TTL on IRedisCollection.SaveAsync().
It is a quite common scenario when you want your object to be in the cache with sliding lifetime if it is being updated.
As of now you either have to use SetAsync(object, Timespan) or HSetAsync(object, TimeSpan, KeyValuePair<string, string>) of RedisConnectionProvider.Connection. The first one lacks an ability to just update the things that need to be changed, the syntax of the latter one is somewhat cumbersome and you have to populate the key separately.
Would be great to have the behaviour similar to InsertAsync(T item, TimeSpan timeSpan) with some additional overrides:
IRedisCollection.SaveAsync(Timespan ttl)
RedisConnectionProvider.Connection.UpdateAsync(T item, Timespan ttl)
The text was updated successfully, but these errors were encountered:
I'm skeptical about moving this behavior to Save/SaveAsync the reason for that is that Save/SaveAsync is meant to operate on everything enumerated in the collection, I think that could get real quirky real fast. Probably adding this to Update/UpdateAsync could make a lot of sense. Will look into it.
Probably adding this to Update/UpdateAsync could make a lot of sense. Will look into it.
Agreed with this. Currently, I want to update the TTL through RedisCollection, would be great if we have it in Update/UpdateAsync or have a binding in the model #251 (comment).
It would be great to be able to update Redis TTL on IRedisCollection.SaveAsync().
It is a quite common scenario when you want your object to be in the cache with sliding lifetime if it is being updated.
As of now you either have to use SetAsync(object, Timespan) or HSetAsync(object, TimeSpan, KeyValuePair<string, string>) of RedisConnectionProvider.Connection. The first one lacks an ability to just update the things that need to be changed, the syntax of the latter one is somewhat cumbersome and you have to populate the key separately.
Would be great to have the behaviour similar to InsertAsync(T item, TimeSpan timeSpan) with some additional overrides:
IRedisCollection.SaveAsync(Timespan ttl)
RedisConnectionProvider.Connection.UpdateAsync(T item, Timespan ttl)
The text was updated successfully, but these errors were encountered: