[packagekit] GetUpdates

Richard Hughes hughsient at gmail.com
Fri Oct 5 07:36:52 PDT 2007

Right, we need to sort out GetUpdates and RefreshCache before we can
even think about a release.

At the moment we do (on fresh boot)

<show tray icon>
<user clicks show updates>

Now, with the conary backend, GetUpdates isn't cheap, and so if we call
it from multiple user sessions frequently it gets expensive very
quickly. Yum is pretty cheap, although still inefficient.

What I'm proposing is:
<show tray icon>
<user clicks show updates>
cached GetUpdates results
(update list is cached)

The first time GetUpdates is called it actually does the action, the
second just returns the internally cached result. By calling the
RefreshCache method we invalidate the cache and then the next GetUpdate
call will actually call the method.

This means we should only have one GetUpdates refresh even when we view
the Update Viewer multiple times.

....or, we could just add a b=use_cache parameter to GetUpdates and
handle this dumbly in the clients.

In this case I'm not sure when we should call RefreshCache - maybe we
should say that GetUpdates should connect to the net and download the
update list, and RefreshCache should download new indexes and rebuild
all the package lists. Ideas?


More information about the PackageKit mailing list