treyturley / FSEJobFinder

A tool to find flights in FSEconomy.
https://treyturley.com/fse-job-finder
0 stars 0 forks source link

Store responses from FSE locally so that we don't have to make as many requests to the API #11

Open treyturley opened 3 years ago

treyturley commented 3 years ago

Storing results Save the responses we receive from FSE so that they can be referenced in future requests. FSE data doesn't change too often and it's not a huge deal if a job is no longer available so we can start with a 30 minute cache for commercial job data. IE: we return a slightly out of date list of aircraft or jobs instead of hitting FSE again.

How often we call FSE could depend on:

In General, storing results will help us cut down on making too many requests to FSE. This will mostly benefit us when we open and close the application multiple times within a short period.

Caching in HttpWebRequest should take care of reducing multiple requests to FSE while the application is running.

treyturley commented 2 years ago

response logging was added in #13. Next step is to check for any locally stored response data before making a new request to the FSE server. For now, locally saved response data will become stale after one hour. After that point new requests will be made to get fresh data.

treyturley commented 2 years ago

Need to have PruneRequests also remove any stored response XMLs.