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

After adding/removing commands, commandhandler needs updates #209

Open
benrick opened this issue Jun 26, 2018 · 2 comments
Open

After adding/removing commands, commandhandler needs updates #209

benrick opened this issue Jun 26, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@benrick
Copy link
Member

benrick commented Jun 26, 2018

When I removed !learn and added a new one, calling it still called the old one.

It seems like the SimpleCommands aren't refreshing.

@benrick benrick added the bug Something isn't working label Jun 26, 2018
@dan-drews
Copy link

Hi there! I saw your show today so I started digging into some issues. I was going to take a stab at this one, but I see a few options on how to approach this:

  • We have a centralized CommandList as a static property in the application that we keep in sync
  • We implement a caching strategy for the command list and other items, and invalidate the cache upon changes to the SimpleCommands
  • We just do a local check where if commands hasn't been updated in x minutes, we have it reload itself
  • We create a delegate that CommandHandler can register with the CommandsCommand that triggers a refresh when the Commands command is called

I'm up for any. I think the last one can work pretty elegantly, and the caching option will require more thought on what other entities should be cached.

@benrick
Copy link
Member Author

benrick commented Jul 24, 2018

I like the idea of a caching strategy for the SimpleCommands, which would invalidate when changing commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants