Store what was previously in SQL tables in flask.g.