MediumSpecificBagOStuff: Make convertToRelative(0) return 0, not 1
authorRoan Kattouw <roan.kattouw@gmail.com>
Thu, 25 Jul 2019 23:39:33 +0000 (16:39 -0700)
committerRoan Kattouw <roan.kattouw@gmail.com>
Thu, 25 Jul 2019 23:53:42 +0000 (16:53 -0700)
commitc33b351a98310876b3e16d5489d691051ec64198
treedb275f31ff90e83ab11559580e0127b4b90682ed
parentb611d2806106a0f8ab61379ca56cf70a3d45d74e
MediumSpecificBagOStuff: Make convertToRelative(0) return 0, not 1

This matches the (explicitly documented) behavior of convertToExpiry(),
and unbreaks storing things in Redis with an indefinite TTL. Without
this change, any attempt to store something in Redis indefinitely
resulted in it being stored with a TTL of 1 second instead.

Follow-up to I1bebb60307.

Bug: T228744
Change-Id: Ia3f71fb787196b956e974beb9f20d72e58ef3eb4
includes/libs/objectcache/MediumSpecificBagOStuff.php