1)refactor the cache plan algo. 2) raise expcetion if no flight found