So the first iteration of this application did not chunk requests into chunks of 128 coordinates. This PR fixes that, runs multiple requests, and reports on them.
As well, this PR now adds database cashing using pstore, part of the Ruby stdlib, allows you to have a file based key value store.
For caching I follow a fairly common process, coordinates are saved to the db with a key of their coordinate, and the value being the OSS Index response + a ttl of Time.now.
Before we query OSS Index, we check the DB first, and add any results that are less than 12 hours old to the server_response. Any purls it doesn't hit on are queried against, and those results are added to the cache too.
So the first iteration of this application did not chunk requests into chunks of 128 coordinates. This PR fixes that, runs multiple requests, and reports on them.
As well, this PR now adds database cashing using
pstore
, part of the Ruby stdlib, allows you to have a file based key value store.For caching I follow a fairly common process, coordinates are saved to the db with a key of their coordinate, and the value being the OSS Index response + a ttl of Time.now.
Before we query OSS Index, we check the DB first, and add any results that are less than 12 hours old to the server_response. Any purls it doesn't hit on are queried against, and those results are added to the cache too.
As well I've added to the CircleCI build: