fix visibility and name of SORT_CACHE_TABLE