Services that use StateDirectory=, CacheDirectory= and friends have their folders managed by systemd. systemd can also empty them for you.
Stop the service first, then pick what to remove:
sudo systemctl stop myapp.service
sudo systemctl clean --what=cache myapp.service
sudo systemctl start myapp.service
The man page lists runtime, state, cache, logs, configuration, fdstore and all as values. Without --what= it removes cache and runtime data and the file descriptor store. For a unit with StateDirectory=demoapp, --what=state makes /var/lib/demoapp disappear; the next start creates it again, empty.
I like this for a cache that went bad, because you do not have to remember whether the app kept its cache in /var/cache/myapp or somewhere under a dynamic user’s private folder. systemd knows, so it removes the right thing.
Be careful with state and all. State is usually the real data of a service: databases, uploaded files, keys. It is gone for good, without a trash folder, so make a backup first. The command refuses to run while the unit is active, which at least stops you from pulling the floor out from under a running program.
Further reading: systemctl man page, systemd.exec man page