parser: Avoid cache stampede on pages which use {{CURRENTYEAR}}
With the precise expiration computation for magic words like
{{CURRENTYEAR}} there's the potential for all the pages which
use (say) {{CURRENTYEAR}} to expire at the exact same time,
causing a cache stampede.
I9acb42b0d9ff67798a1624cbf9c7cac99c8fbe2f added code to "randomly"
stagger the cache expiration:
$ttl += ( $deadlineUnix % self::DEADLINE_TTL_STAGGER_MAX );
However, this "stagger" was not actually random, since it is
based on the computed deadline. So all of the pages which use
{{CURRENTYEAR}} will all compute the same $deadlineUnix (midnight
of January 1st of the next year) and thus compute the same "stagger".
Change $deadlineUnix to $tsUnix so that the stagger is based on when
this particular page is being parsed, which should actually have
the desired effect of spreading out the possible cache stampede.
Followup-To: I9acb42b0d9ff67798a1624cbf9c7cac99c8fbe2f
Change-Id: I95272e301c00e4646dd29ca22abc26c6cbe9028e