Implementing Advanced Caching Strategies in Flask Applications