Data Expiration
It's possible to achieve data expiration by using the ExpirableSet function. It provides logical deletion, it means that it is not physically deleted from db, but it's not possible to query it anymore after deletion.
:::: tabs
::: tab Go
_, err = client.ExpirableSet(ctx, []byte("expirableKey"), []byte("expirableValue"), time.Now())
if err != nil {
log.Fatal(err)
}
//the following will raise an error with key not found
_, err = client.Get(ctx, []byte("expirableKey"))
if err == nil || !strings.Contains(err.Error(), "key not found") {
log.Fatalf("expecting key not found error: %v", err)
}:::
::: tab Java
This feature is not yet supported or not documented. Do you want to make a feature request or help out? Open an issue on Java sdk github project :::
::: tab Python This feature is not yet supported or not documented. Do you want to make a feature request or help out? Open an issue on Python sdk github project :::
::: tab Node.js This feature is not yet supported or not documented. Do you want to make a feature request or help out? Open an issue on Node.js sdk github project :::
::: tab .Net This feature is not yet supported or not documented. Do you want to make a feature request or help out? Open an issue on .Net sdk github project :::
::: tab Others If you're using another development language, please refer to the immugw option. :::
::::