cache stages only by project permalink

Better version of #221 

/cc @zendesk/samson