Support semver targets in cache clean command, fixes #688.

#688