Cache parsed ranges
Ignore invalid ranges

They cannot be cache since multiple commits/branches may
map to the same version number which would lead to
unpredictable results.