[
https://issues.apache.org/jira/browse/IGNITE-14326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17573030#comment-17573030
]
Stanislav Lukyanov commented on IGNITE-14326:
---------------------------------------------
[~kukushal] I think you'll get exactly the behavior you need if you use an
`EntryProcessor` that changes nothing and returns nothing. The value will be
touched, the new TTL will be set based on the `ExpiryPolicy`, nothing will be
touched, and no value will be returned.
If this WA has any unfortunate side effects (e.g. fetching a value onto the
heap), it's better to remove the side effects than introduce a new API (e.g.
make the `EntryProcessor` fetch value onto the heap lazily).
> Resetting Ignite cache entry TTL
> --------------------------------
>
> Key: IGNITE-14326
> URL: https://issues.apache.org/jira/browse/IGNITE-14326
> Project: Ignite
> Issue Type: Improvement
> Components: cache
> Affects Versions: 2.3
> Reporter: Stephen Darlington
> Priority: Major
> Labels: cggg
> Original Estimate: 64h
> Remaining Estimate: 64h
>
> Ignite provides a way to specify an expiry policy on per entry level, but
> there is no way to refresh the TTL without first retrieving the record, which
> is slow and resource consuming if an entry is large.
> Provide a method to reset Ignite cache entry TTL.
> Suggested API (to be discussed with community):
> {{IgniteCache#touch(key)}}: resets the TTL using the latest TTL value or does
> nothing if no TTL was specified for the key.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)