使用BreezeJs,如何在user2进行更改后如何处理user1的更新缓存? [英] With BreezeJs how do you handle updating cache for user1 after user2 has made changes?

查看:42
本文介绍了使用BreezeJs,如何在user2进行更改后如何处理user1的更新缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

试图找到适合breezejs的解决方案,如果user1 / device1具有项目的缓存列表,并且user2 / device2更新了其中一条记录,则除非手动刷新,否则user1仍会看到陈旧的数据。

Trying to find the proper solution for breezejs, if user1/device1 has a cached list of projects and user2/device2 updates one of those records, user1 still sees stale data unless they manually refresh.

有哪些解决方案可确保User1获得新的更新数据?我可以做一些保存实体的操作,以将其从每个人的缓存中删除吗?缓存基于每个用户吗?

What are the solutions to make sure User1 gets the new upated data? Is there something I can do on save of entity to remove it from everyone's cache? Is the cache based per user?

推荐答案

Breeze EntityManager 缓存是客户端缓存,因此每个用户/设备/应用程序都会有自己的数据。除了重新查询之外,没有简单的方法可以使这些缓存保持同步。乐观并发,只要您正在使用它,就可以确保您不会使用旧数据更新新数据,但是陈旧的数据问题仍然非常现实。

The Breeze EntityManager cache is a client side cache, so each user/device/application will have its own data. There is no simple way to keep these caches in sync except by requerying. Optimistic concurrency, providing you are using it, does guarantee that you do not update newer data with older data, but the stale data issue is still very real.

Breeze的其他几个用户已经对使用SignalR和Breeze进行了调查,以让Breeze知道何时以及需要刷新什么,但是现在这些解决方案都是定制的。请在Breeze用户语音中添加您的投票( https://breezejs.uservoice .com / forums / 173093-1-breezejs-feature-suggestions ),如果您想查看示例或Breeze& amp;之间的紧密集成SignalR。

We along with several other Breeze users have investigated using SignalR with Breeze to let Breeze know when and what to refresh, but right now these solutions are all custom. Please add your vote to the Breeze User Voice ( https://breezejs.uservoice.com/forums/173093-1-breezejs-feature-suggestions) on this topic if you want to see either examples or tighter integration between Breeze & SignalR.

这篇关于使用BreezeJs,如何在user2进行更改后如何处理user1的更新缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆