Page MenuHomeIsabelle/Phabricator
Diviner Phabricator Tech Docs PhabricatorCachedClassMapQuery

final class PhabricatorCachedClassMapQuery
Phabricator Technical Documentation (Cache)

Cached PhutilClassMapQuery which can perform lookups for single classes efficiently.

Some class trees (like Conduit methods and PHID types) contain a huge number of classes but are frequently accessed by looking for a specific class by a known identifier (like a Conduit method name or a PHID type constant).

Loading the entire class map for these cases has a small but measurable performance cost. Instead, we can build a cache from each Conduit method name to just the class required to serve that request. This means that we load fewer classes and have less overhead to execute API calls.

Methods

public function setClassMapQuery($query)

This method is not documented.
Parameters
PhutilClassMapQuery$query
Return
wild

public function setMapKeyMethod($method)

This method is not documented.
Parameters
$method
Return
wild

public function loadClasses($values)

This method is not documented.
Parameters
array$values
Return
wild

public function loadClass($value)

This method is not documented.
Parameters
$value
Return
wild

private function getCacheKeys($values)

This method is not documented.
Parameters
array$values
Return
wild

private function newObject($class_name)

This method is not documented.
Parameters
$class_name
Return
wild

private function newObjectMap()

This method is not documented.
Return
wild

private function getObjectMapKey($object)

This method is not documented.
Parameters
$object
Return
wild