Like any other operating system, GNU/Linux has implemented a memory management efficiently and even more than that. But if any process is eating away your memory and you want to clear it, Linux provides a way to flush or clear ram cache.
sudo nano -w flushram.sh
chmod 755 flushram.sh
crontab -e
press: 10 2 * * * /home/flushram.sh
For example, append the below line, save and exit to run it at 2am daily.
sudo sh flushram.sh