Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Do some caching in loadOutdated() #632

Closed

Description

@benogle

Currently PackageManager::loadOutdated() is stateless, and it sucks. Anytime any part of the settings view needs to know what outdated packages there are, it needs to hit the network and ask. This leads to #409. And this is being exacerbated by package cards in any view that can have the update information. No bueno.

We should cache the outdated packages in the settings view's PackageManager. loadOutdated could do the network bit, load the cache, and emit events. This method could be called when it is currently for the status bar icon. Every consumer of the outdated data can call some other method like getOutdated which could return a promise, just in case the cache isnt loaded up yet.

This will fix #409, and could be the way to #615

cc @thedaniel

Activity

  1. self-assigned this
    on Aug 18, 2015
  2. winstliu commented on Dec 11, 2016

    @winstliu
    Contributor

    As far as I can tell in my latest tests (with #887) there is caching going on in loadOutdated, and the updates panel loads fast. As in, it takes longer to load the font icons then it does to load the package cards.

    Closing.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions