Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Option to not cache flows or export the flow cache in index.js #76
I use nools to create a large number of flows dynamically from a set of flow definitions. Each flow definition is stored by a unique name which i use to create the flow object.
These flow objects are then managed by a LRU cache which disposes the flow object when required.
However in certain scenarios the LRU cache is destroyed and dispose is not called. In this case I have no more references available of all my previously created flows and when i try to recreate them I get an error saying they already exist.
I can bypass this by asking nools if the flow exists before recreating it.
However what do I do in the scenario when I never recreate a flow again. Wouldn't there be a memory leak caused due the reference maintained on the
An example to show more clearly what i mean
In this case if i never try to create Flow B again it will forever remain in the
I think there should be an option to disable storing a created flow in the