I want to perform a custom access check for every page load.
For this purpose I implement
AccessCheckInterface and perform the checks in the
AccessCheckInterface has a method
applies, which returns an array of route requirement keys for which the access check is performed, as far as I understand.
Unfortunately, I have no idea what route requirement keys are and where to find them.
Currently, I simply return TRUE, which results in the access method being called several dozen times per page load. I would like this access check being done only once per page load as I have to perform an expensive network query. Is there a route requirement key for this? Can this be done in a different way?