How long does ramdisk last?

I'm using WR841N. I put a custom hosts file in /tmp/custom_hosts.

Will this be safe until I reboot the device?

anything you put in a ramdisk eats memory and makes it more likely that you will
run out of ram.

other than that, anything you put there will last until you reboot or delete it.

I'm using WR841N. I put a custom hosts file in /tmp/custom_hosts.

Will this be safe until I reboot the device?
k

I tested today and it's no longer working. Is there any reason I shouldn't be able to point to custom hosts file in ramdisk?

There is no problem with using a ramdisk (or rather tmpfs) for your hostfile, but with the expected caveat of losing it after each reboot (so you really need to find a way to recreate it during the boot process). In order to automate this, I would recommend to look into the adblock package (but yes, RAM is a limiting factor on your device, not really for adblock itself, but certainly for larger kill lists).

Well, it's working again today. Maybe it was some kind of caching issue.