When OpenWrt Loses Squid’s Files at Reboot
A common /var→RAM-backed /tmp layout loses contents at reboot; other builds can keep /var persistent.
A common OpenWrt layout links /var to RAM-backed /tmp, so Squid files stored there are lost at reboot. Other builds can keep /var persistent. Check the actual filesystem and mount before blaming Squid for missing directories; the pathname alone does not establish durability.
| Requirement | Startup/storage action |
|---|---|
| Retain cache/log contents | Use a mounted persistent volume and update the package's supported source configuration |
| Disposable cache | Create required runtime directories each boot through supported startup |
For persistence, retain backend/sizing options while changing the path. Editing only generated runtime configuration may be overwritten.
The volume must be mounted before Squid and writable by its service identity. Moving a path to /opt or /mnt supplies neither storage nor mount readiness. Distinguish absent directory, permissions and unavailable mount from the first startup error.