.NET Client Documentation
5.1.1
Search Results for

    Show / Hide Table of Contents

    UpdateTimeToLive Method

    UpdateTimeToLive(TKey, TimeSpan)

    Updates the time-to-live of an entry.

    Declaration
    Task<bool> UpdateTimeToLive(TKey key, TimeSpan timeToLive)
    Parameters
    TKey key

    A key.

    TimeSpan timeToLive

    A time to live (0ms to live forever; -1ms to use the server-configured value).

    Returns
    Task<Boolean>

    true if the entry exists and its time-to-live value is changed; otherwise false.

    Remarks

    The value is automatically expired, evicted and removed after the timeToLive has elapsed. If timeToLive is i.e. 0ms, the value is retained indefinitely. If it is -1ms, it lives for the duration of the server-configured time-to-live.

    The new time-to-live value is valid starting from the time this operation is invoked, not since the time the entry was created.

    If the entry does not exist or is already expired, this call has no effect.

    If there is no entry with key key or is already expired, this call makes no changes to entries stored in this dictionary.

    Time resolution for is seconds. The given value is rounded to the next closest second value.

    In This Article
    Back to top Copyright © 2010-2022 Hazelcast, Inc. All rights reserved.
    Generated by DocFX.