Future Optimizations


Postgres/Graph DB: Currently, the API does not support insertions. However, especially with a graph DB like Neo4j, insertions into the organization (which is essentially a graph), using a graph database would allow for faster insertion. It would also be useful for Regex queries where we are matching and running joins on nodes based off varying criteria.


Cache invalidation: If we made the application support inserts, we would subsequently need to invalidate the cache as soon as the database updates. This is because the previous version of the cache matched the previous state of the organization, but not the new one. Clearing the cache is key here.


Time to live: In order to help ensure we have an updated cache, it is helpful to add expiration on our cache. After the cache is expired, we can refetch the data and ensure that our organization graph is up to date.