supress warnings for unchecked cast on cache use moved to variable declaration