Enable in-memory feature caching for properties
Work Items
- [x] Implements feature caching for static features that do not change between runs.
- [x] Update documentation
- [x] Add unit tests
- [x] ~Verify/Reason if we need a function to explicitly clear the cache?~
Idea: Cache static features that do not change across learning iterations. Improves training speed at the cost of using more memory for caching the features. Tested this on the Chunker app and there is a significant improvements to training time.
- Can be extended further with other caching implementation like MapDB (which supports on-disk caching)
One big concern I have is the confusion that it might create a little confusion with cache = true (vs isStatic ). Especially in the documentation here. We might consider changing the terminology and clarify the difference (+use cases).
On the implementation, I'd suggestion different approach: we can reuse the existing caching. The only thing we have to do is to make sure we don't clean in between each training iterations. That is handled here by this function.. So the only change needed is, not calling the clear function for properties for which isStatic is specified.
This is ready to be reviewed.