I'm using spring statemachine in my spring boot application. In this application I have configured redis as StateMachineRuntimePersister in this way:
@Bean
public StateMachineRuntimePersister<?, ?, String> stateMachineRuntimePersister(RedisStateMachineRepository redisStateMachineRepository) {
return new RedisPersistingStateMachineInterceptor<>(redisStateMachineRepository);
}
And I pass above persister to my StateMachinService.
With this configuration, everything is working and states saved in redis. But I want to set ttl(time to live) for data in redis. Is there any way to achieve this?