Comment 0 for bug 459418

Revision history for this message
James Westby (james-w) wrote : Cache is broken with multiple processes

httplib2 says:

class FileCache(object):
    """Uses a local directory as a store for cached files.
    Not really safe to use if multiple threads or processes are going to.
    be running on the same cache.
    """

launchpadlib sub-classes that, but doesn't change that fact.

This means that with multiple processes or threads you will
suddenly get strange error messages (bug 404204).

This is made worse by the fact that creating an object uses a
global cache, and login_with does this with no way to override it.

The best way to fix this is to just fix the cache implementation
rather than everyone learning to use a private cache and
fixing launchpadlib to make this possible with the convenience
methods.

Thanks,

James