Update ccache logic for system shared ccache

Change-Id: I255510fb5981d88414a9b16d119a331c91fa4fab