Skip to content

Conversation

ChristianSteffens
Copy link

This relates to https://github.com/ebroecker/canmatrix/pull/825.

While speeding up frame_by_id is useful, it changes the original behavior: Our environment expects a fresh, up-to-date frame each call, whereas the cache may return outdated data (e.g. after renaming a frame).

To stay consistent with other APIs, I’d suggest keeping two variants:

  • get_frame_by_attribute: cache-based
  • frame_by_attribute: always searches

Alternatively, the cache could be reset whenever a frame attribute changes, but that would require much more intrusive changes. I’d prefer keeping the PR as minimally invasive as possible.

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.

1 participant