Add `WithRDBPersistence` and `WithAOFPersistence` to Redis resource
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
Redis provides a range of persistence options: [RDB](https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/#snapshotting),[AOF](https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/#append-only-file) and RDB+AOF.
The `WithPersistence` in Redis resource configures `redis-server` to use RDB.
We should add `WithRDBPersistence` and `WithAOFPersistence` and consider deprecating `WithPersistence` in favor of `WithRDBPersistence`.
discussion: #9738
### Describe the solution you'd like
Add `WithRDBPersistence` that is the same as `WithPersistence` and add `WithAOFPersistence` that configure `redis-server` to use the `AOF` option.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.