Fix customer detection when system enable cache.

Fix customer detection when system enable cache.