test cast for cache handling