openculinary / knowledge-graph

The RecipeRadar knowledge graph stores and provides access to recipe and ingredient relationship information.
GNU Affero General Public License v3.0
10 stars 0 forks source link

Dynamically reload product hierarchy using a cached service call #73

Closed jayaddison closed 2 years ago

jayaddison commented 2 years ago

Describe the reason for these changes and the problem that they solve

After making edits to product data by using the Admin UI presented by the backend service, it can be easy to forget to perform the tedious and manual steps required to update the product data held within this service.

This change introduces dynamic loading of product data from source, with a 1-hour expiry for that data.

In future we may want to consider migrating the source-of-truth for product data -- and the admin UI -- into this service. Currently we have a kind of custom-implemented data replication going on here, and we shouldn't really need to invent our own data replication solutions.

Briefly summarize the changes

  1. Make a service call to the backend service to preload product data, and cache the results for one hour

How have the changes been tested?

  1. Local development testing

List any issues that this change relates to Relates to openculinary/backend#54.