Change build cache to be a decorator