Added cache logic to the application.