TL;TR;: do not change XDG_CACHE_HOME globally unless you are sure you really want to do that.
Changing XDG_CACHE_HOME globally, like some people suggested would not only affect pip but also other apps as well. You simply do not want to mess that deep, because it's simply not necessary in most of the cases. So what are your alternatives then? You could be using pip's --cache-dir <dir> command line option instead:
pip --cache-dir=<dir> ...
Or you could override value of XDG_CACHE_HOME variable for pip invocation only:
XDG_CACHE_HOME=<path> pip ...
which also can be made more permanent by i.e. using shell alias feature:
alias pip="XDG_CACHE_HOME=<path> pip"
BUT, but, but... there is not need to touch XDG_CACHE_HOME at all, as pip can have own configuration file, in which you can override all of the defaults to match your needs, including alternative location of cache directory. Moreover, all command line switches have accompanying environment variables that pip checks at runtime, which looks like the cleanest approach for your tweaks.
In your particular case, --cache-dir can be provided via PIP_CACHE_DIR env variable. So you can either set it globally:
export PIP_CACHE_DIR=<path>
or per invocation:
PIP_CACHE_DIR=<path> pip ...
or, you create said pip's configuration file and set it there.
See docs for more information about pip config file and variables.
pip cache --cache-dir <new path>just--cache-dir <new path>pip <command> --cache-dir <path>. But this only affects the current command, not permanently AFAIK. For examplepip install something --cache-dir ~/.mycache.