BroncoDirectMe / Backend

BroncoDirectMe's API for the Chrome Extension
https://broncodirect.me
9 stars 1 forks source link

[PRIMARY FEATURE] Caching RMP Information #51

Closed GuyWhoCode closed 1 year ago

GuyWhoCode commented 1 year ago

User Story

As a developer, I want to keep the stored RMP information up-to-date.

Technical Tasks

The following steps should be done as a possible method to keep the stored RMP information up-to-date.

  1. User queries professor name.
  2. Backend /professor endpoint checks professor data from the database.
    • A new column in the professor database, a timestamp, should be added. When the professor data is checked, the code compares the current timestamp with the stored timestamp.
    • If a certain threshold (like 3 months) is passed when checking the timestamps, the backend will query GraphQL to update and store professor information.
  3. If the professor is found and the timestamp is more than 3 months old, query GraphQL, store new data, and return the data to the user.
    • If the timestamp is not more than 3 months old, return the professor data from the database.

Acceptance Criteria