Re: Assets cache invalidation



On Thu, Sep 14, 2017 at 12:36 PM, Richard Hughes <hughsient gmail com> wrote:
We just call them a generic name rather than a plugin name. Maybe we
should do two things:

* The @kind in gs_utils_get_cache_filename() should be the plugin name

Maybe we just have to document it better then, and suggest that resources that are to be managed by a single plugin should use the plugin's name in the "kind" argument.
 
* The vername in gs_utils_get_cache_filename should just go

This means we'd create /home/hughsie/.cache/gnome-software/fwupd
rather than /home/hughsie/.cache/gnome-software/3.27/firmware

Totally agree.
 
I think trying to manage the cache of the plugin outside of the plugin
is kinda crazy, i think each plugin just needs to be responsible for
cleaning up the cache if required at a good time, perhaps in the
_refresh() callback.

I wasn't suggesting that. In fact, I wanted to get rid of the automatic invalidation so that every plugin and g-s itself would have to manage the cache invalidation directly.

I think that simply by not using the vername as you wrote above would do it! And we leave the invalidation for the plugins or any code in g-s to do directly.
I am glad you got such a simple solution. Let's do it!

Joaquim Rocha | Endless


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]