how to cache these database results and serve from cache to menu instead of fetching the result every time?