Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Caching to CBA_fnc_compatibleItems #261

Closed
wants to merge 2 commits into from
Closed

Add Caching to CBA_fnc_compatibleItems #261

wants to merge 2 commits into from

Conversation

jokoho48
Copy link
Member

adding Caching for config values based on #260

@PabstMirror
Copy link
Contributor

There never is a call to setVariable to save the results in the cache.
The filter only runs on a cache hit, so would be ignored on the first call.
There is no proper return on a cache miss, it always just returned 0 from the last count statement.
There is an extra private ["_compatibleItems"]; inside the if (isNil "_compatibleItems") then { so there would be scope issues on that variable.

@jokoho48 look at d69a097 for fixes and a test case.
Can probably just PR that branch if you are ok with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants