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

Fix property_cache_once_per_frame #240

Merged
merged 1 commit into from
Feb 19, 2019
Merged

Conversation

MythicManiac
Copy link

Current implementation of the "property_cache_once_per_frame" decorator
doesn't work with multiple instances of the same class. This is due to
the cache being stored to the function itself, rather than to the
individual object it's being called on.

Address this issue by adding a parameter to the decorator, which can
be used to define where the cache should be stored on the object, and
store the cache there.

This allows multiple bots to co-exist in a single process without
conflicting caches.

Current implementation of the "property_cache_once_per_frame" decorator
doesn't work with multiple instances of the same class. This is due to
the cache being stored to the function itself, rather than to the
individual object it's being called on.

Address this issue by adding a parameter to the decorator, which can
be used to define where the cache should be stored on the object, and
store the cache there.

This allows multiple bots to co-exist in a single process without
conflicting caches.
@MythicManiac
Copy link
Author

Continuation of #210

@Dentosal Dentosal merged commit 6e95b71 into Dentosal:develop Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants