Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a local cache for cards #8

Open
NiloCK opened this issue Jun 17, 2018 · 0 comments
Open

Implement a local cache for cards #8

NiloCK opened this issue Jun 17, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@NiloCK
Copy link
Owner

NiloCK commented Jun 17, 2018

Fetching a card by id requires three round-trips (the 2nd two in parallel) from the database:

  1. request card by id
    • returns id_view, id_data
  2. request view, request data
    • return viewName, questionData
    • render the appropriate view with the returned data

This is too slow for fetching to occur between each viewed card. A card cache should exist that stores cards data locally in an associative array, with the id_card as key.

Card loading should check the cache first and perform db lookups when necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant