Generalize cache definition so we extend easily
I am trying to add another cache group for gitlab-jh/jh-team
and I realized that it's a bit tedious to add one more. This should make it easier.
I tried to maintain API compatibility but we may revisit and simplify more.