Closed Tingfing6 closed 1 year ago
You can provide the TTL via UpdateOptions
on your Query
:
Query q = …;
q = q.queryOptions(UpdateOptions.builder().ttl(Duration.ofSeconds(10)).build());
cassandraTemplate.update(q, update, UserRecentCupidCd.class);
boolean res = cassandraTemplate.update(getPrimaryIdAndUserIdQuery(toUserId), update, UserRecentCupidCd.class); How can I set the expiration time of this data while updating ?I am using spring-data-cassandra:3.0.2.RELEASE and I cannot find how to set the expiration time of this data