Flush DNS
Flush DNS cache with history tracking
LLA Flush DNS Plugin
DNS cache flushing plugin for lla with history tracking and cross-platform support.
Features
- Cross-Platform: Works on macOS, Linux, and Windows
- History Tracking: Track all flush operations with timestamps
- Confirmation Prompts: Optional confirmation before flushing
- Statistics: View flush history and success rates
Configuration
Configuration file location: ~/.config/lla/plugins/flush_dns/config.toml
confirm_before_flush = true
show_verbose_output = true
max_history_size = 50
[colors]
success = "bright_green"
info = "bright_cyan"
warning = "bright_yellow"
error = "bright_red"Usage
Flush DNS cache
lla plugin --name flush_dns --action flushThis will:
- Show confirmation prompt (if enabled)
- Execute the appropriate flush command for your OS
- Display success/failure message
- Show verbose output (if enabled)
- Save the operation to history
View flush history
lla plugin --name flush_dns --action historyDisplays:
- List of recent flush operations
- Timestamps
- Operating system
- Success/failure status
- Statistics (total, successful, failed)
Clear flush history
lla plugin --name flush_dns --action clear-historyPrompts for confirmation and clears all flush history.
Configure preferences
lla plugin --name flush_dns --action preferencesAdjust settings:
- Toggle confirmation before flush
- Toggle verbose output
- Set max history size
Display help
lla plugin --name flush_dns --action helpDisplay Examples
Flushing DNS
ℹ Info: Flushing DNS cache on macOS...
✓ Success: DNS cache flushed successfully!History View
📜 DNS Flush History:
──────────────────────────────────────────────────────────────────────
✓ 2025-10-20 16:30:45 [macOS] Success
✓ 2025-10-20 15:20:30 [macOS] Success
✗ 2025-10-20 14:15:22 [macOS] Failed
──────────────────────────────────────────────────────────────────────
📊 Statistics:
• Total flushes: 25
• Successful: 24
• Failed: 1Platform Commands
- macOS:
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder - Linux:
sudo systemd-resolve --flush-cachesorsudo systemctl restart nscd - Windows:
ipconfig /flushdns
Actions
flush- Flush the DNS cachehistory- View flush historyclear-history- Clear flush historypreferences- Configure plugin preferenceshelp- Show help information
Troubleshooting
macOS
If the flush fails, you may need to run with sudo permissions. The plugin attempts to use sudo automatically.
Linux
The plugin tries multiple methods:
systemd-resolve --flush-caches(for systemd-based systems)systemctl restart nscd(for systems using nscd)
If both fail, you may need to manually install one of these services.
Windows
The command requires administrator privileges. Run your terminal as administrator if the flush fails.
Common Use Cases
After Changing DNS Settings
lla plugin --name flush_dns --action flushTroubleshooting Network Issues
When experiencing DNS resolution problems, flushing the cache can help:
lla plugin --name flush_dns --action flushAfter Editing /etc/hosts
Clear DNS cache to ensure new host entries are recognized:
lla plugin --name flush_dns --action flush