Further clarify the function of SectionSortCache

Change-Id: Iae24118a0229bea1f9ea6800d75829d0d6a7387d
This commit is contained in:
Han-Wen Nienhuys
2018-01-31 16:25:15 +01:00
parent e69cd5c9b7
commit 7f54a2c63c

View File

@@ -31,7 +31,14 @@ import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** Caches the order AccessSections should be sorted for evaluation. */
/**
* Caches the order AccessSections should be sorted for evaluation.
*
* <p>Access specifications for a more specific ref (eg. refs/heads/master rather than refs/heads/*)
* take precedence in ACL evaluations. So for each combination of (ref, list of access specs) we
* have to order the access specs by their distance from the ref to be matched. This is expensive,
* so cache the sorted ordering.
*/
@Singleton
public class SectionSortCache {
private static final Logger log = LoggerFactory.getLogger(SectionSortCache.class);