Scripts: Factor Cache utilities into dedicated module

Change-Id: I41908213df7e437bab077131b475768d5a34e67b
Merge "Scripts: Factor Cache utilities into dedicated module"