Rework tile expiry script to use the flat node cache