Currently, our application uses Momento for caching. We would like to extend the caching functionality to support Redis as well, allowing the app to dynamically choose between Momento and Redis based on environment variables.
Expected Behavior:
If the environment variable MOMENTO_KEY is present, the app should use Momento for caching.
If the environment variable REDIS_URL is present (and MOMENTO_KEY is absent), the app should use Redis for caching.
If neither environment variable is present, or the default cache configuration (REDIS) should be used.
Technical Details:
The app should prioritize Redis over Momento when both environment variables (MOMENTO_KEY and REDIS_URL) are available.
Update the configuration logic to support both caching systems.
Additional Notes:
Update documentation to reflect the new Redis support and how to configure either caching system.
Ensure backward compatibility with existing Momento configurations.
Currently, our application uses Momento for caching. We would like to extend the caching functionality to support Redis as well, allowing the app to dynamically choose between Momento and Redis based on environment variables.
Expected Behavior:
Technical Details:
Additional Notes: