What problem does it solve?
This Skill provides standardized and efficient ways to manage core infrastructure concerns within a YWeb application, including caching, error handling, logging, configuration, file storage, and scheduled tasks.
Core Features & Use Cases
- Caching: Implement efficient data caching with automatic invalidation for ORM objects and relationships using
@cached decorator.
- Exception Handling: Centralize error management with
Err for business exceptions and global handlers.
- Logging: Utilize
get_logger() for module-aware, configurable logging with sensitive data filtering.
- Configuration: Manage application settings via YAML and environment variables using
AppSettings.
- File Storage: Integrate with local, OSS, or S3 storage solutions.
- Scheduled Tasks: Define and manage cron jobs and other scheduled operations.
- Use Case: When developing a new feature, use the
@cached decorator to optimize database reads for frequently accessed user profiles, and ensure all errors are logged and handled gracefully using the provided exception handling mechanisms.
Quick Start
Read the documentation for the YWeb caching module to implement a cached function.