Middle ware for Caching Mysql