-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: hyperoslo/Cache #11
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Introduced a hybrid caching system utilizing both memory and disk storage for various media types, enhancing performance and reducing network calls. - Implemented type-safe caching with specific storage for books, movies, TV shows, and more, ensuring efficient data retrieval. - Added cache expiration policies: memory cache expires after 30 minutes, while disk cache expires after 24 hours. - Included methods for automatic cache cleanup and removal of expired items, improving resource management. - Updated item detail service to prioritize cache retrieval before network requests, optimizing user experience.
- Implemented a cache-then-network strategy for immediate content display, improving user experience. - Added background data refresh functionality to keep cached content up-to-date. - Introduced optimistic UI updates with loading states for better responsiveness during data fetching. - Enhanced item detail view model to manage loading and refreshing states effectively. - Updated documentation to reflect new caching strategies and UI enhancements.
- Simplified loading state handling in ItemDetailView to enhance user experience during data fetching. - Introduced a circular progress indicator overlay for refreshing states, improving visual feedback. - Updated ItemDetailViewModel to manage concurrent loading tasks, ensuring previous tasks are canceled before new ones are initiated. - Enhanced error handling and loading logic to provide clearer user feedback when items are not found or loading fails. - Streamlined the code structure for better readability and maintainability.
- Changed logger initialization in ItemDetailViewModel to use a predefined Logger.view instance for improved consistency and clarity in logging. - This update enhances the maintainability of the logging system within the item detail view context.
- Changed logger initialization to use a predefined Logger.networkAuth instance, enhancing clarity in logging. - Updated debug messages to provide more context, such as specifying "OAuth callback" and adding a log for token exchange. - Added an info log for user logout to improve tracking of authentication state changes.
- Updated logger initialization in AuthService, ItemDetailService, ShelfService, TimelineService, and UserService to use specific Logger instances for improved clarity and consistency. - Introduced new Logger categories: networkAuth, networkItem, networkShelf, networkTimeline, and networkUser, enhancing the maintainability of the logging system. - This refactor aims to streamline logging practices across network-related services, facilitating better tracking and debugging.
…rity - Updated the logging documentation to reflect the use of Apple's OSLog framework, providing a unified logging approach. - Refined log categories by introducing specific subcategories for network operations, including `network.auth`, `network.timeline`, `network.item`, `network.shelf`, and `network.user`. - Improved log level descriptions and examples for better understanding and usage. - Enhanced the usage guide with service-specific logging examples, ensuring clarity in logging practices across different components. - Updated best practices to emphasize the importance of context and performance considerations in logging.
…nd production environments - Updated logging documentation to clarify the log format for different environments. - Introduced environment-specific log formatting: detailed logs for development (including file name, line number, and function name) and simplified logs for production (showing only the message). - Refactored logger methods to utilize a new `formatMessage` function, improving code maintainability and consistency across logging levels.
- Updated logger initialization in Router, HomeViewModel, HTMLContentView, and LibraryViewModel to use predefined Logger instances for improved clarity and consistency. - Introduced specific Logger categories for navigation and various views, enhancing the maintainability of the logging system. - This refactor aims to streamline logging practices across the application, facilitating better tracking and debugging.
…pecific view operations - Updated logging documentation to include a comprehensive category hierarchy for network and view operations, improving clarity and organization. - Introduced new Logger categories for navigation and specific views, such as `Logger.router`, `Logger.library`, and `Logger.home`, to enhance the maintainability of the logging system. - This update aims to provide better guidance on logging practices and facilitate easier tracking and debugging across the application.
- Implemented a "cache-then-network" strategy to improve user experience by providing immediate content display from cache while refreshing data in the background. - Introduced detailed caching configurations, including memory and disk cache limits and expiration policies for various media types. - Optimized loading state management in the ItemDetailViewModel to ensure smooth user interactions and better error handling. - Updated documentation to reflect new caching strategies and implementation details, enhancing clarity for future development.
- Enhanced loading state handling to prevent double fetching and improve user feedback during data loading. - Optimized refresh logic to eliminate unnecessary fetches and manage refresh states effectively, especially in error scenarios. - Updated cache management strategies to ensure better organization and performance. These changes aim to provide a smoother user experience and more efficient data handling in the item detail view.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.