How to turn off persistence feature when not needed


I have connected to Redis db for the persistence and it is working fine. But when I expose this as a service, few teams don’t want to persist their data.

So how to disable or turn off persistence when I needed