如何设计Coredata来存储应用程序的缓存数据
寻找最佳实践和想法。 我尝试的问题是: 我会尽量简单。在Coredata中,有实体:book
,类型
,用户
。
关系:用户一对多的书
,用户一对多类型
,预订多个对许多流派。
用户中的用户这种情况只有一个(当前已登录的用户)。
除了用户簿之外,该应用程序还将包含其他书籍列表,例如建议,顶部等。
我正在尝试设计一个可以在Coredata中缓存这些列表的系统(它们是从后端获取页面),并尝试尝试确实要提出一个可扩展的解决方案,希望有一个不错的设计:)。如果您对Coredata和系统的设计有任何想法或经验,我将感谢任何见解。
祝大家有美好的一天!
Looking for the best practices and ideas.
The problem I am trying is the following:
I'll try to keep it simple. In the CoreData there are entities: Book
, Genre
, User
.
Relationships: User one-to-many Book
, User one-to-many Genre
, Book many-to-many Genre.
The user in this case will be in only one (currently logged-in user).
The app besides the user books will have other books' lists, e.g. suggested, top, etc.
I am trying to design a system where those lists can be cached(they are fetching page by page from the backend) in the CoreData, and trying really to come up with a scalable solution that hopefully has a nice design:). If you have any thoughts or experience on the design for the CoreData and the system, I would appreciate any insights.
Have a great day everybody!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论