Open ghost opened 6 years ago
At this stage, no, there is no caching mechanism in PowerNSX. We are aware of the issue (services is not the only affected area of the API) but the overhead of building a flexible caching mechanism isn't something we've had the bandwidth to tackle unfortunately. Generally speaking, if you know you need to do something costly like that more than once, it's best to build your own simple cache by just populating a local collection or hashtable to reference.
@nmbradford thank you for the quick response. I'm going to look into it, first time powershell users so wish me luck.
Hello,
I'm working on microsegementation implementation. I noticed that the Get-NsxService commandlet was slow (could take up to 1 minute to complete). After running the debug I noticed it will get all services via the rest API. The NSX manager currently has ~30000 service objects so that will course the delay.
Is there a way that Get-NsxService can cache the outcome of the REST API call so there is no extra stress on the NSX manager and we only have to fetch the applications once?