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

cachedOpsTimeout #219

Closed
dcharbonnier opened this issue Jun 28, 2018 · 2 comments
Closed

cachedOpsTimeout #219

dcharbonnier opened this issue Jun 28, 2018 · 2 comments

Comments

@dcharbonnier
Copy link
Contributor

The doc define a timeout for each of the op

    setTimeout(function() {
        if (this.cachedOps[0] === op) this.cachedOps.shift();
      }.bind(this), 
      this.cachedOpsTimeout)
  1. After a this.cachedOps.length = 0 we could already clear them.
  2. Running the unit tests take the time of the tests + the cachedOpsTimeout duration, it seams quite complicated to call destroy() on all docs when we close the sharedb server so at least it should be possible to redefine cachedOpsTimeout globaly.
gkubisa added a commit to Teamwork/sharedb that referenced this issue Jul 10, 2018
@gkubisa
Copy link
Contributor

gkubisa commented Jul 10, 2018

@dcharbonnier Did you mean to open this issue at https://github.com/Teamwork/sharedb?

Expiring cached ops using setTimeout had its problems, so I now remove expired ops when new ops are cached, see Teamwork@0153d0f. This should be more efficient and friendlier for unit tests. Does it solve the problem for you?

@dcharbonnier
Copy link
Contributor Author

close with Teamwork@0153d0f

gkubisa added a commit to Teamwork/sharedb that referenced this issue Jul 20, 2018
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

2 participants