Page MenuHomePhorge

APC: Set ttl to 0 when ttl is not given
ClosedPublic

Authored by mainframe98 on Oct 27 2024, 12:59.

Details

Summary

Passing null as a value for parameter $ttl is deprecated.
Omitting the parameter is considered to be equivalent to 0.

Bug: T15064

Test Plan
  • Looked in the deprecation log and did not see a deprecation message from apc.

Diff Detail

Repository
rP Phorge
Branch
master
Lint
Lint Passed
Unit
Tests Skipped
Build Status
Buildable 1613
Build 1613: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Oct 27 2024, 13:13
src/infrastructure/cache/PhutilAPCKeyValueCache.php
41

let's also default to 0 here?

  • APC: Change the setKeys $ttl parameter default to 0
mainframe98 added inline comments.
src/infrastructure/cache/PhutilAPCKeyValueCache.php
41

I was concerned that that might cause a deprecation warning about non-matching signatures, so I kept this change small.

This revision was automatically updated to reflect the committed changes.
mainframe98 marked an inline comment as done.