synchronize cache in method clearCache