Skip to content

Conversation

@initvector
Copy link
Contributor

This update does a few things:

  1. Adds a new controller, AddonCacheController, to handle interfacing with the addon cache via endpoints.
  2. Adds two endpoints to the new controller: verify and clear. The verify endpoint scans addons of a particular type and verifies the cache is in sync with the directory contents. The clear endpoint nukes the current addon cache.
  3. Implements an automatic, asynchronous request for cache validation upon loading up the applications, plug-ins or theme management pages. This request is limited to the type currently being viewed (e.g. only verify the themes cache if you're viewing the themes page). Based on the result, the user is warned their cache is outdated and prompts them to clear it. If they elect to clear it, a second request is sent to the server to clear the cache. If the result was successful, the page is reloaded.
  4. A config-based kill switch has been added for this functionality: Cache.Addons.DisableEndpoints. If this config value is true, the whole controller is disabled and the checks are not run on addon settings pages.
  5. Introduces a new JavaScript action class: js-close-inform. Clicking elements with this class will close the inform message element it resides in. This is done to close the cache notification for a user, if they click the link to clear their addon cache. Otherwise, the message remains.

Closes #4989

@initvector initvector added this to the 2017-Q1-3 milestone Feb 8, 2017
@linc linc assigned linc and unassigned tburry Feb 15, 2017
@linc linc modified the milestones: 2017-Q1-4, 2017-Q1-3 Feb 15, 2017
@linc linc merged commit 43316ce into master Mar 2, 2017
@linc linc deleted the feature/manage-addon-cache branch March 15, 2017 13:43
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.

Visiting addon list pages should clear the appropriate cache

4 participants