Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Cache condition in helpers.Script #3797
Implementing this as part of Hacktoberfest. The pull-request adds some caching so that we don't always re-create the conditions in the scripts.
The caching is a simple in-memory, per-instance dictionary.
This naive implementation has some disadvantages (e.g., we won't be able to cache two conditions that contain references to distinct-but-equivalent object instances and we don't have any control over the size of the condition cache), but for most simple use-cases the approach should be good enough.
Related issue: fixes #3629