fetch data from cache or mysql