Clean up Key-Value Cache diff
Summary:
Feedback from D3974.
- Make $profiler private and provide getProfiler().
- Document PhutilKeyValueCache.
- Document $ttl.
- Move $ttl from getKey() signature to setNextTTL($ttl) on PhutilKeyValueCacheStack.
- Make return values for kvimpl methods more consistent.
- Fix apc_clear_cache() -> apc_clear_cache('user').
- Test for invalid memcache TTL.
- Document memcache server specification.
- Use PhutilFileLock to control access to the cachefile in PhutilKeyValueCacheOnDisk.
- Write the new disk cache to the same place as the old disk cache. The write is now protected by a lock.
- Document PhutilKeyValueCacheStack->setCaches().
- Remove redundant method definitions in PhutilKeyValueCacheStack.
- Unrelated, update documentation of PhutilFileLock.
Test Plan: Ran unit tests. Ran slow TTL unit tests.
Reviewers: vrana, btrahan
Reviewed By: vrana
CC: aran
Maniphest Tasks: T2062
Differential Revision: https://secure.phabricator.com/D3978