Factorize build mapacache