When caching is enabled - it's done without respecting QRY_LAST/QRY_FIRST flag. For example:
$Net::Whois::Raw::CACHE_DIR = "/tmp/";
my $domain = 'example.com';
my $aa = whois($domain, undef, 'QRY_FIRST');
my $bb = whois($domain, undef, 'QRY_LAST');
say "wrong" if $aa eq $bb;
When caching is enabled - it's done without respecting QRY_LAST/QRY_FIRST flag. For example: