I can remember watching a determined ground squirrel eating a tomato plant that, out of frustration, I had covered with cayenne, black and white pepper.
Another time I watched a squirrel return several times to retrieve some buried seeds in a pot I had coated with cayenne pepper.
The only thing that worked for me was building a wire mesh cage completely around my pots, but that didn't prove very practical or attractive.
As I mentioned on another thread, the only thing that worked was to finally eliminate the problem by using a device called the Rat Zapper baited with shelled peanuts.
It was them or me and I wasn't going to be cheated out of enjoying patio and garden plants.