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

Entity caching #43

Open
zverok opened this issue Mar 4, 2016 · 0 comments
Open

Entity caching #43

zverok opened this issue Mar 4, 2016 · 0 comments

Comments

@zverok
Copy link
Contributor

zverok commented Mar 4, 2016

First take: eternal cache with manual cleanup.

  1. Cache is opt-in (should be explicitly turned on through config or Reality.cache!)
  2. Cache path should be configured (with reasonable default somewhere in /tmp?..)
  3. Each entity is cached by name, in two separate file: wikipedia data & wikidata data (we cache source, not parsed entity, because after adding new parsers richer data can be extracted from same cached source; drawback is parsing speed)
  4. There should be way to query if entity is from cache or from the wild (or, alternatively, how old is it)
  5. Dictionaries (lists) caching.

In future, we should consider:

  • TTL settins (even per-entity);
  • Explicity refreshing entity or invalidating cache;
  • Methods, if possible, for meta-query Wikipedia/Wikidata "if the page changed" (for cached pages), and load them only in this case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant