filmov
tv
Caching with SwiftUI Task Modifier | REST API Data | In Memory & Disk | Expiration Timestamp

Показать описание
We are going to learn on how to implement Caching Layer to a News App that currently using iOS 15 SwiftUI Task Modifier to trigger data fetching. At the end of this video, we should be able implement the Cache with these requirements below to improve the efficiency of our app:
- In-memory based Cache.
- Disk based Cache that survives app restart. Display cache data when the user is offline.
- Thread safe data access with Actor type.
- Expiration timestamp cache invalidation
- Manual cache invalidation.
- Automatic cache eviction when system resource are low.
#swiftui #iosdev #caching
This tutorial is made using the following:
- Xcode 13 Beta 5
- iOS 15 Developer Beta 7
Timeline:
00:00 Introduction, Demo, and Getting Started
06:39 Building In Memory Cache Actor
17:49 Integrating Cache to Observable Object/ViewModel
23:20 Testing and Handling Manual Cache Invalidation
29:30 Create Cache Protocol and Shared Extension
36:32 Tracking Keys of Cache Entry
41:32 Building Disk Cache Actor with Codable Support
48:47 Integrating Disk Cache to Observable Object and Testing
53:01 Challenge and Conclusion
GitHub Repository Link:
Part 1 - Build an iOS News App with SwiftUI 3 & NewsAPI | Full Course:
Part 2 - Add iPadOS UX Adaptivity to an iOS News App with SwiftUI 3 | Full Course:
Part 3 - Building macOS News App with SwiftUI 3 & NewsAPI | Full Course:
Part 4 - Building watchOS News App with SwiftUI 3 & NewsAPI | Full Course:
Part 5 - Building tvOS News App with SwiftUI 3 and NewsAPI:
NewsAPI Website:
Caching in Swift | Swift by Sundell:
- In-memory based Cache.
- Disk based Cache that survives app restart. Display cache data when the user is offline.
- Thread safe data access with Actor type.
- Expiration timestamp cache invalidation
- Manual cache invalidation.
- Automatic cache eviction when system resource are low.
#swiftui #iosdev #caching
This tutorial is made using the following:
- Xcode 13 Beta 5
- iOS 15 Developer Beta 7
Timeline:
00:00 Introduction, Demo, and Getting Started
06:39 Building In Memory Cache Actor
17:49 Integrating Cache to Observable Object/ViewModel
23:20 Testing and Handling Manual Cache Invalidation
29:30 Create Cache Protocol and Shared Extension
36:32 Tracking Keys of Cache Entry
41:32 Building Disk Cache Actor with Codable Support
48:47 Integrating Disk Cache to Observable Object and Testing
53:01 Challenge and Conclusion
GitHub Repository Link:
Part 1 - Build an iOS News App with SwiftUI 3 & NewsAPI | Full Course:
Part 2 - Add iPadOS UX Adaptivity to an iOS News App with SwiftUI 3 | Full Course:
Part 3 - Building macOS News App with SwiftUI 3 & NewsAPI | Full Course:
Part 4 - Building watchOS News App with SwiftUI 3 & NewsAPI | Full Course:
Part 5 - Building tvOS News App with SwiftUI 3 and NewsAPI:
NewsAPI Website:
Caching in Swift | Swift by Sundell:
Комментарии