fixed detection of cache class