move caching logic in Net::ZXTM for other to use