Backend behavior: InMemory vs Redis
mainInMemoryBackend
Data is stored in memory and is only deleted when an expired key is accessed. This means data that is never accessed again will remain in memory until the process restarts.
RedisBackend
Requires a Redis client where decode_responses is set to False (the default). If decode_responses=True is used, the client will attempt to decode binary cached data as strings, which will break the caching mechanism.