Clearing the partition using the stock recovery means factory reset.
If you use twrp, you can clear the cache partition without losing your data and your personal configurations/costumizations will be intact.