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

Allow caching id lookups #3

Open
Leonidas-from-XIV opened this issue Apr 20, 2015 · 0 comments
Open

Allow caching id lookups #3

Leonidas-from-XIV opened this issue Apr 20, 2015 · 0 comments

Comments

@Leonidas-from-XIV
Copy link
Owner

After talking with @eras today, the automatic lookup is causing him quite a bit of latency.

Multiple solutions are possible:

  • Caching: look it up once and that's it. Problem: channel might get renamed, so the cached id might point to a channel that is not the same as the one that was requested.
  • Caching and expiring: The id is looked up and stored for some time. Unfortunately, the cache might be out of date and pointing to the wrong channel. Even worse, when it expires, it might even point to a different channel or no channel at all.
  • Explicit name resolution for channel: It would be nice it there was a function, that takes a channel and and looks up it's id and returns a ChannelId channel. Something like channel_of_channel.

I currently tend toward the latter proposal, but happy to hear input on this.

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

No branches or pull requests

1 participant