Launchpadlib automatically decompresses the documents it receives, and
caches the responses in a temporary directory.

    >>> import httplib2
    >>> httplib2.debuglevel = 1

    >>> from launchpadlib.testing.helpers import salgado_with_full_permissions
    >>> launchpad_with_cache = salgado_with_full_permissions.login()
    connect: ...
    send: 'GET /beta/ ...
    reply: ...200...
    ...
    header: Transfer-Encoding: deflate
    ...
    send: 'GET /beta/ ...
    ...
    reply: ...200...
    ...
    header: Transfer-Encoding: deflate
    ...

    >>> print launchpad_with_cache.projects['firefox'].name
    send: 'GET /beta/firefox ...
    reply: ...200...
    ...
    firefox

The second and subsequent times you request some object, it's likely
that launchpadlib will make a conditional HTTP GET request instead of
a normal request. The HTTP response code will be 304 instead of 200,
and launchpadlib will use the cached representation of the object.

    >>> print launchpad_with_cache.projects['firefox'].name
    send: 'GET /beta/firefox ...
    reply: ...304...
    ...
    firefox

The default launchpadlib cache directory is a temporary directory
that's deleted when the Python process ends. (If the process is
killed, the directory will stick around in /tmp.) It's much more
efficient to keep a cache directory across multiple uses of
launchpadlib.

You can provide a cache directory name as argument when creating a
Launchpad object. This directory will fill up with cached HTTP
responses, and since it's a directory you control it will persist
across launchpadlib sessions.

    >>> import tempfile
    >>> tempdir = tempfile.mkdtemp()

    >>> first_launchpad = salgado_with_full_permissions.login(tempdir)
    connect: ...
    send: 'GET /beta/ ...
    reply: ...200...
    ...
    send: 'GET /beta/ ...
    reply: ...200...
    ...

    >>> print first_launchpad.projects['firefox'].name
    send: 'GET /beta/firefox ...
    reply: ...200...
    ...
    firefox

This will save you a *lot* of time in subsequent sessions, because
you'll be able to use cached versions of the initial (very expensive)
documents.

    >>> second_launchpad = salgado_with_full_permissions.login(tempdir)
    connect: ...
    send: 'GET /beta/ ...
    reply: ...304...
    ...
    send: 'GET /beta/ ...
    reply: ...304...
    ...

    >>> print second_launchpad.projects['firefox'].name
    send: 'GET /beta/firefox ...
    reply: ...304...
    ...
    firefox

Of course, if you ever need to clear the cache directory, you'll have
to do it yourself.

    >>> httplib2.debuglevel = 0
    >>> import shutil
    >>> shutil.rmtree(tempdir)
