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

[WIP] add inventory view cache #368

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Conversation

maxlath
Copy link
Member

@maxlath maxlath commented Feb 25, 2020

adds caching per user and access level (public, network, private) to limit the amount of cached data while maximizing the cache hits:

  • inventory-view request for a single user => possibly fully cached
  • inventory-view request for a group => gets possibly cached individual inventory views from users, and aggregates it (this last operation isn't cached to limit required cache busts)

TODOs: bust cache on every events that might change the inventory view data:

  • item created/updated/deleted => bust affected caches (possibly several, depending on the listing (aka visibility level)
  • edition entity update on work (wdt:P629) claims
  • work entity update on author (wdt:P50, +), genre (wdt:P136), subject (wdt:P921) claims

to be able to pass a custom admin, typically for groups that where created
with a custom user, instead of the one returned by `getUser`
…d inventory views

before this, the itemsByDate arrays where concatenated one user after another
thus loosing order as soon as several cached inventory view were aggregated
that's possibly some premature optimization, but it doesn't add much complexity
as its not used by the client
@maxlath
Copy link
Member Author

maxlath commented Aug 30, 2020

status update: waiting for the merge of #371 to rebase and restart work

making the current cache testable to see if it was refreshed
during entity claim update
in order to call refreshInventoryViewsFromEntity outside update claim controller

- delete some obsolete tests since sanitize is tested
- explicit endpoint on first test
starting with adding a claim to an entity
refresh caches of all owners of item of this entity
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.

None yet

2 participants