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

CBLIS - Improve relationship cache invalidation #960

Closed
pasin opened this issue Oct 22, 2015 · 0 comments
Closed

CBLIS - Improve relationship cache invalidation #960

pasin opened this issue Oct 22, 2015 · 0 comments

Comments

@pasin
Copy link
Contributor

pasin commented Oct 22, 2015

Relationship cache is currently invalidated by checking between CBLQueryEnumerator.lastSequence and database.lastSequence. As a result, the whole cache will be invalidated even though the changes to the database are not relevant to the cache. One way to improve this is to invalidate cache based on changes notified by the CBLDatabaseChangeNotification. Another way would be checking if the view is changed or not - this needs to call View.updateIndex first and check View.lastSequenceChangedAt to check. Note that View.updateIndex and View.lastSequenceChangedAtare all private.

@pasin pasin self-assigned this Oct 22, 2015
@zgramana zgramana added this to the 1.2 milestone Oct 23, 2015
@pasin pasin added in progress and removed ready labels Dec 9, 2015
pasin added a commit that referenced this issue Dec 10, 2015
- Not using view prefix for relationship views.
- Call view's -updateIndex and check lastSequenceIndexed if the view index was changed or not. If not changed, return the cached result if it's available.

#960
@pasin pasin closed this as completed in 463e273 Dec 10, 2015
pasin added a commit that referenced this issue Jan 28, 2016
- Not using view prefix for relationship views.
- Call view's -updateIndex and check lastSequenceIndexed if the view index was changed or not. If not changed, return the cached result if it's available.

#960
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

3 participants