You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Erel Magnus (Jira)" <ji...@apache.org> on 2020/10/20 18:20:00 UTC

[jira] [Commented] (IGNITE-7641) Add CacheEntry#ttl method

    [ https://issues.apache.org/jira/browse/IGNITE-7641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17217843#comment-17217843 ] 

Erel Magnus commented on IGNITE-7641:
-------------------------------------

Hi

At Citigroup we need an ability to renew the TTL for a cache entry as part of IgniteCache class.

 

At the moment we do the below, but it is sub optimal because it copies the data from off heap cache to the heap, creates demand for heap, creates demand for garbage collection etc.
{code:java}

igniteCompute.affinityCallAsync(
        igniteCache.getName(),
        key,
        () -> {
            igniteCache.get(key);
            return null;
        }) {code}

> Add CacheEntry#ttl method
> -------------------------
>
>                 Key: IGNITE-7641
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7641
>             Project: Ignite
>          Issue Type: Improvement
>          Components: cache
>    Affects Versions: 2.3
>            Reporter: Valentin Kulichenko
>            Priority: Major
>             Fix For: 2.10
>
>
> Ignite provides a way to specify an expiry policy on per entry level, but there is no way to know the current TTL for a particular key.
> We can add {{CacheEntry#ttl()}} and/or {{IgniteCache#ttl(K key)}} method that will provide this information. Looks like it's already available via {{GridCacheMapEntry#ttl()}}, so we just need to properly expose it to public API.
> Here is the user forum discussion about this: http://apache-ignite-users.70518.x6.nabble.com/Get-TTL-of-the-specific-K-V-entry-td19817.html



--
This message was sent by Atlassian Jira
(v8.3.4#803005)