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

Invalidate Repo and Permission Cache #1232

Closed
bradrydzewski opened this issue Oct 12, 2015 · 3 comments
Closed

Invalidate Repo and Permission Cache #1232

bradrydzewski opened this issue Oct 12, 2015 · 3 comments
Milestone

Comments

@bradrydzewski
Copy link

The list of user repositories and the permissions to those repositories are cached in a simple LRU cache without expiration (due to lack of time on my part to focus on caching). We need a TTL to avoid rendering stale data in the user interface, otherwise this can result in the following behavior:

  1. search results / auto-complete do not include recently added repositories
  2. dashboard does not include recently added repositories
  3. recently elevated repository permissions (ie changing write -> admin) are not considered

There will still be situations where our cache is stale, but we can handle this well enough in the user interface. For example, when I search for a repository that isn't in our cache (perhaps was recently created) we can show a message that says something like this:

{repo_name} is unknown or does not exist. Click here to visit this repository page and activate.

We can also provide a button to manually flush the cache in order to force a refresh.

@bradrydzewski bradrydzewski added this to the v0.4.0 milestone Oct 12, 2015
@bradrydzewski
Copy link
Author

implemented a 24 hour cache and informational messages in the UI in case the cache is stale

@bradrydzewski
Copy link
Author

changed to 15 minute cache a few weeks ago until we have a way to force-refresh from the UI

@bradrydzewski bradrydzewski modified the milestones: v0.4.0, v0.5.0 Jul 13, 2016
@bradrydzewski
Copy link
Author

This fix landed for the upcoming 0.5 release by providing a button to re-sync your account. See screenshot

screen shot 2016-06-08 at 3 14 30 pm

bot2-harness pushed a commit that referenced this issue Apr 19, 2024
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

No branches or pull requests

1 participant