separation of concerns. Consumers of the library can build up a cache of services and use that as they like. The library doesn't really need to hold state like this.
In this repo that means building a cache by calling $netbox->allservices(), then assigning to devices returned by $netbox->devices(0).
We use a cache because getting all services for all devices is a lot of API calls which is slow.
separation of concerns. Consumers of the library can build up a cache of services and use that as they like. The library doesn't really need to hold state like this.
In this repo that means building a cache by calling
$netbox->allservices()
, then assigning to devices returned by$netbox->devices(0)
. We use a cache because getting all services for all devices is a lot of API calls which is slow.