1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-31 02:01:13 +00:00

#364 Make aliases cache persistent

This commit is contained in:
nvbn 2015-09-07 19:05:38 +03:00
parent f3525e9fe0
commit 7339a97b90

View File

@ -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])