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
@slorello89 When saving a record with a TTL InsertAsync(), we should have a way to write the record without a TTL, in the case we want to persist the record without TTL.
Currently, if the record was initially saved with TTL, saving again without TTL does not adjust the previously set TTL, and the record disappears after some time.
Can I suggest making the TimeSpan nullable, so if we save with a NULL TimeSpan, then the result is the TTL is removed (if one exists)?
The text was updated successfully, but these errors were encountered:
Good point - this would definitely be nice to have. In the interim you can use PERSIST and EXPIRE/PEXIRE commands directly to influence the expiry of the object you want to update. I almost wonder if binding an expiration to the model might even make sense at some point down the line?
I almost wonder if binding an expiration to the model might even make sense at some point down the line?
I can see some benefit of expressing it on the model. I've def. run into some use cases where the record is always temporary. If it was on the model, the same pattern to short-circuit it? Save passing NULL for the TimeSpan property?
I can see some benefit of expressing it on the model. I've def. run into some use cases where the record is always temporary. If it was on the model, the same pattern to short-circuit it? Save passing NULL for the TimeSpan property?
Can we get some attribute support for default TTL? My use case is that there are some records that I want to automatically set a TTL on and I would like to define that on the model itself via an attribute, inline with the current configuration patterns.
Then when writing the record, if the TTL is set on the attribute, that TTL is used when making the write call. Something tells me we would want a way to bypass the attribute ttl as well as there may be times when we want to ignore the attribute TTL.
@slorello89 When saving a record with a TTL
InsertAsync()
, we should have a way to write the record without a TTL, in the case we want to persist the record without TTL.Currently, if the record was initially saved with TTL, saving again without TTL does not adjust the previously set TTL, and the record disappears after some time.
Can I suggest making the TimeSpan nullable, so if we save with a NULL TimeSpan, then the result is the TTL is removed (if one exists)?
The text was updated successfully, but these errors were encountered: