I do this to fight my OCD of checking repeatedly that I locked the doors.
To an extent it helps.
As a side note I noticed that after I stopped drinking coffee entirely my memory improved, but at the same time my OCD returned to heights I haven't seen since the first time I tried this beverage.
I wonder how this works?