Store an avatar in the cache, assigning the given globally unique ID to it, which can later be used to load and remove the avatar from the cache. For example, this ID could be the UID of a persona. The URI of the cached avatar file will be returned.
This method may be called multiple times concurrently for the same avatar ID (e.g. an asynchronous call may be made, and a subsequent asynchronous call may begin before the first has finished).
Concurrent file I/O may be rate limited within each AvatarCache instance to avoid file descriptor exhaustion.
id |
the globally unique ID for the avatar |
avatar |
the avatar data to cache |
a URI for the file storing the cached avatar |
GLib.Error |
if the avatar data couldn't be loaded, or if creating the avatar directory or cache file failed |
0.6.0