Miloas

Results 11 comments of Miloas

I met the same issue

@John728 I found a workaround for this https://github.com/ms-jpq/chadtree/issues/262

1. `乐观更新`的部分写在OptimisticCache会很蛋疼, 因为需要额外的操作来mix真数据和OptimisticCache中的数据. 这点上我建议真实写. 2. `乐观更新`的周期不一定很短。 (比如聊天室的channel,需要 发消息/收消息 触发后端socket来创建真channel) 3. @Brooooooklyn 的revertController是操作级别的(insert/update/delete...),有时候我们其实需要表级别的revert. (其实我们需要的是事务级别的revert) 4. 我们现在的where是不支持嵌套的字段的,这样面临的问题就是请求的response和socket过来的数据很难patch到乐观数据上. (因为我们不能通过_id来patch,乐观数据是没有_id的) 但是真对4,有一种hack的方法,就是把乐观数据的嵌套字段拍平... 但是这个方法就很丑了...

比如聊天室我创建了三个假的(乐观的)channel,在关闭的时候,我需要把这三个全部revert了 这种情况

构造成一样似乎不行.. 比如 乐观更新的数据是这样的: ``` { _id: 'pseudo_xxxx' creator: { id: '123456' name: 'xxx' } } ``` socket的数据是这样: ``` { _id: 'xxxxx' creator: { id: '123456' name: 'xxx' } } ```...

嗯 这样就很爽了

我大概想了一下. 按`prefetch`这样搞对无删除或者低频删除的这种情况来说,请求数无缘无故加了一倍... 我更赞成yn的做法 当做缓存失效这种搞

这个issue在消息列表已经遇到了.. 需要加急确定方案

The indentation is correct if I remove the generic ```typescript function applyF(arg: any, f: Function): any { return f(arg); } applyF({ body: 'hello'}, () => { ∣ }) ``` This...