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

Periodically cache all latest published Exercises #362

Open
Dantemss opened this issue Apr 6, 2022 · 0 comments
Open

Periodically cache all latest published Exercises #362

Dantemss opened this issue Apr 6, 2022 · 0 comments

Comments

@Dantemss
Copy link
Member

Dantemss commented Apr 6, 2022

Description

The cache can be cleared as a result of migrations or it may simply become too full.
Periodically cache the latest published exercises so the search returns without errors.

Acceptance Criteria

Periodically run something similar to this:

Exercise.chainable_latest.published.preload(*Exercise::CACHEABLE_ASSOCIATIONS).preload(*Exercise::UNCACHEABLE_ASSOCIATIONS).find_each(batch_size: 100) {|ex| Api::V1::Exercises::Representer.new(ex).to_hash}

Acceptance Tests for testrail

  • title:
  • categories:

GIVEN something
AND something else
WHEN something
AND something else
THEN something
AND something else

Tests that will be added or changed

Written explanations of the tests that will have to be added or modified to test this change.

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

No branches or pull requests

1 participant