Yes, le number there is le number of seconds left jusqu'à that record expires (providing we're pas querying le authoritative nameserver). Obviously avec a CNAME il y a a level of redirection, so le TTL for le A record it points to dans ce cas may be important as well.
If you wait a couple of seconds et run dig again on votre local nameserver, you should see that TTL number decrease by le number of seconds you waited (approximately). When it hits 0, it'll refresh ou si votre nameserver refreshes le zone for certains reason.
As mentioned above, there is a difference entre dig being run against a nameserver avec a cached entry et le nameserver that is authoritative for that entry.
(in le examples I use ci-dessous I use le +noauthority +noquestion & +nostats flags juste to keep le output terse).
Note le difference entre le suivant queries:
$ dig +noauthority +noquestion +nostats stackoverflow.com @ns2.p19.dynect.net.
; <<>> DiG 9.7.0-P1 <<>> +noauthority +noquestion +nostats stackoverflow.com @ns2.p19.dynect.net.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50066
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 0
;; WARNING: recursion requested but not available
;; ANSWER SECTION:
stackoverflow.com. 432000 IN A 69.59.196.211
So in le ci-dessus query, we're querying a nameserver that is authoritative for stackoverflow.com. If you notice le flags section, pay special attention to le aa flag qui denotes this is an authoritative answer (i.e. pas cached).
$ dig +noauthority +noquestion +noadditional +nostats stackoverflow.com
; <<>> DiG 9.7.0-P1 <<>> +noauthority +noquestion +noadditional +nostats stackoverflow.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43514
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4
;; ANSWER SECTION:
stackoverflow.com. 246696 IN A 69.59.196.211
In le ci-dessus query, we ne have an aa flag, et le TTL will keep decreasing as we query et query. Ceci est essentially le counter J'étais talking about previously.