如何设计Coredata来存储应用程序的缓存数据

发布于 2025-02-02 20:56:54 字数 390 浏览 3 评论 0原文

寻找最佳实践和想法。 我尝试的问题是: 我会尽量简单。在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文