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

Feature: Index caching #80

Open
wants to merge 6 commits into
base: 8.x-7.x
Choose a base branch
from
Open

Feature: Index caching #80

wants to merge 6 commits into from

Conversation

mgalang
Copy link
Contributor

@mgalang mgalang commented Jul 8, 2021

Description

The process of re-indexing massive amount of entities are often quite slow because each entity needs to be loaded, recalculated and serialized. This process could be speed up significantly by caching the entity's serialized data when it is saved, and by loading the cached version of the entity's serialized data during re-indexing processes. The cached data is invalidated and re-created on each entity update to ensure that the cache remains up to date.

How it works

  1. Caching could be enabled per index from the index's annotation (see example).
  2. Entity is serialized when it is saved.
  3. The serialized data is cached (the cache ID includes language, index-id, entity-type and id as a context).
  4. The serialized cached data is loaded during re-indexing

index-cache

@mgalang mgalang requested a review from maijs July 8, 2021 13:46
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

Successfully merging this pull request may close these issues.

1 participant