09-24-2017 11:54 PM - edited 03-01-2019 04:00 AM
Hi all,
When traversing the model tree, Maagic API (or Maapi underneath) stores all data in a cache, if there's alot of devices with bunch of configurations on them in NSO, and we're doing some complex operation where we have to go through most of the device model tree, this consumes too much memory. Is there a method to clear that cache?
Simon
Solved! Go to Solution.
09-26-2017 05:15 AM
MAAPI isn't doing any caching, so one option would be to go there instead.
Each MAAGIC object starts without any cached value. Only when the value is actually accessed, MAAGIC will go and read the value, then keep the value within itself "in a cache". There is no (official) way to clear that value once it has been read, but obviously deleting the object will also remove the cached value.
So with MAAGIC, you need to ensure you delete the objects that you no longer wish to know the value of.
09-26-2017 05:15 AM
MAAPI isn't doing any caching, so one option would be to go there instead.
Each MAAGIC object starts without any cached value. Only when the value is actually accessed, MAAGIC will go and read the value, then keep the value within itself "in a cache". There is no (official) way to clear that value once it has been read, but obviously deleting the object will also remove the cached value.
So with MAAGIC, you need to ensure you delete the objects that you no longer wish to know the value of.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide