- Timestamp:
- 10/21/20 13:49:40 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r790 r792 6293 6293 6294 6294 # write fresh records if: 6295 # - the zone contains ALIAS pseudorecords, which need to cascade changes from the upstream CNAME farm at every opportunity 6296 if ( ($dbh->selectrow_array("SELECT count(*) FROM records WHERE domain_id = ? AND type=65300", undef, $domid))[0] ) { 6297 $changed = 1; # abuse this flag for zones with ALIAS records 6298 # also update the serial number, because while it shouldn't matter purely for serving 6299 # records, it WILL matter if AXFR becomes part of the publishing infrastructure 6300 $self->_updateserial(domain_id => $domid); 6301 } 6302 # - the zone contains records which expire in less than 10 minutes or became valid less than 10 minutes ago 6303 # note, no need to multi-bump the serial 6304 elsif ( ($dbh->selectrow_array("SELECT COUNT(*) FROM records WHERE domain_id = ? AND ". 6305 "stampactive='t' AND @(extract(epoch from stamp-now())) < 600", undef, $domid))[0] ) { 6306 $changed = 1; 6307 $self->_updateserial(domain_id => $domid); 6308 } 6295 6309 # - we are not using the cache 6296 6310 # - force_refresh is set … … 6298 6312 # - the cache file does not exist 6299 6313 # - the cache file is empty 6300 # - the zone contains ALIAS pseudorecords, which need to cascade changes from the upstream CNAME farm at every opportunity6301 if ( ($dbh->selectrow_array("SELECT count(*) FROM records WHERE domain_id = ? AND type=65300", undef, $domid))[0] ) {6302 $changed = 1; # abuse this flag for zones with ALIAS records6303 }6304 6314 if (!$self->{usecache} || $self->{force_refresh} || $changed || !-e $cachefile || -z $cachefile) { 6305 6315 if ($self->{usecache}) {
Note:
See TracChangeset
for help on using the changeset viewer.