From 7339a97b90a4cdf86a5784428ad683ce718b2397 Mon Sep 17 00:00:00 2001 From: nvbn Date: Mon, 7 Sep 2015 19:05:38 +0300 Subject: [PATCH] #364 Make aliases cache persistent --- thefuck/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thefuck/utils.py b/thefuck/utils.py index b533e6e6..0292cb76 100644 --- a/thefuck/utils.py +++ b/thefuck/utils.py @@ -187,7 +187,7 @@ def cache(*depends_on): if cache.disabled: return fn(*args, **kwargs) - cache_path = os.path.join(tempfile.gettempdir(), '.thefuck-cache') + cache_path = settings.user_dir.joinpath('.thefuck-cache').as_posix() # A bit obscure, but simplest way to generate unique key for # functions and methods in python 2 and 3: key = '{}.{}'.format(fn.__module__, repr(fn).split('at')[0])