chore: document formatting rules
This commit is contained in:
8
USAGE.md
8
USAGE.md
@@ -24,14 +24,17 @@ await DailyNotification.scheduleDailyNotification({
|
||||
## Configuration Options
|
||||
|
||||
### Storage Mode
|
||||
|
||||
- **`'shared'`** (Recommended): Uses shared SQLite database with WAL mode
|
||||
- **`'tiered'`** (Legacy): Uses SharedPreferences/UserDefaults + in-memory cache
|
||||
|
||||
### TTL Settings
|
||||
|
||||
- **`ttlSeconds`**: Maximum age of content at delivery time (default: 1800 = 30 minutes)
|
||||
- **`prefetchLeadMinutes`**: How early to prefetch content (default: 15 minutes)
|
||||
|
||||
### Performance Optimization
|
||||
|
||||
- **`enableETagSupport`**: Use conditional requests for bandwidth savings
|
||||
- **`enableErrorHandling`**: Advanced retry logic with exponential backoff
|
||||
- **`enablePerformanceOptimization`**: Database indexes, memory management, object pooling
|
||||
@@ -39,6 +42,7 @@ await DailyNotification.scheduleDailyNotification({
|
||||
## Platform-Specific Features
|
||||
|
||||
### Android
|
||||
|
||||
```typescript
|
||||
// Check exact alarm status
|
||||
const alarmStatus = await DailyNotification.getExactAlarmStatus();
|
||||
@@ -55,6 +59,7 @@ if (recoveryStatus.recoveryNeeded) {
|
||||
```
|
||||
|
||||
### iOS
|
||||
|
||||
```typescript
|
||||
// Background tasks are automatically handled
|
||||
// The plugin uses BGTaskScheduler for T–lead prefetch
|
||||
@@ -64,6 +69,7 @@ if (recoveryStatus.recoveryNeeded) {
|
||||
## Advanced Usage
|
||||
|
||||
### Error Handling
|
||||
|
||||
```typescript
|
||||
// Configure retry behavior
|
||||
await DailyNotification.configure({
|
||||
@@ -80,6 +86,7 @@ console.log(`Cache hit ratio: ${errorMetrics.cacheHitRatio}`);
|
||||
```
|
||||
|
||||
### Performance Monitoring
|
||||
|
||||
```typescript
|
||||
// Get performance metrics
|
||||
const metrics = await DailyNotification.getPerformanceMetrics();
|
||||
@@ -94,6 +101,7 @@ if (metrics.overallScore < 70) {
|
||||
```
|
||||
|
||||
### Rolling Window Management
|
||||
|
||||
```typescript
|
||||
// Manual maintenance
|
||||
await DailyNotification.maintainRollingWindow();
|
||||
|
||||
Reference in New Issue
Block a user