Page MenuHomePhabricator

When "apcu_clear_cache()" exists, prefer it as a cache clear callback over "apc_clear_cache()"
ClosedPublic

Authored by epriestley on Aug 21 2017, 9:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 12:24 PM
Unknown Object (File)
Thu, Nov 14, 7:09 AM
Unknown Object (File)
Wed, Nov 13, 10:14 PM
Unknown Object (File)
Sun, Nov 10, 3:42 PM
Unknown Object (File)
Sat, Nov 9, 2:31 PM
Unknown Object (File)
Fri, Nov 8, 11:17 AM
Unknown Object (File)
Wed, Nov 6, 3:51 PM
Unknown Object (File)
Wed, Oct 30, 2:57 AM
Subscribers
None

Details

Summary

See PHI36. APCu originally had apc_ methods, but at some point dropped these and only provides apcu_ methods.

When the apcu_ method is present, use it. It may not be present for older versions of APCu, so keep the fallback.

Test Plan
  • With modern APCu, clicked "Purge Caches" in Config > Caches.
  • Before: fatal on bad apc_clear_caches call.
  • After: Valid cache clear.

Diff Detail

Repository
rP Phabricator
Branch
acpu1
Lint
Lint Errors
SeverityLocationCodeMessage
Errorsrc/applications/cache/spec/PhabricatorDataCacheSpec.php:92XHP45PHP Compatibility
Unit
Tests Passed
Build Status
Buildable 18116
Build 24346: Run Core Tests
Build 24345: arc lint + arc unit