(namespace=None)
return cachedir
Returns and potentially creates a persistent safe cachedir location
    based on XDG_CACHE_HOME or ~/.cache

    Optionally creates a sub namespace inside the pwndbg cache folder.
Returns and potentially creates a persistent safe cachedir location
    based on XDG_CACHE_HOME or ~/.cache
Returns and potentially creates a persistent safe cachedir location based on XDG_CACHE_HOME or ~ / . cache
def cachedir(namespace=None):
    """
    Returns and potentially creates a persistent safe cachedir location
    based on XDG_CACHE_HOME or ~/.cache

    Optionally creates a sub namespace inside the pwndbg cache folder.
    """
    cachehome = os.getenv('XDG_CACHE_HOME')
    if not cachehome:
        cachehome = os.path.join(os.getenv('HOME'), '.cache')
    cachedir = os.path.join(cachehome, 'pwndbg')
    if namespace:
        cachedir = os.path.join(cachedir, namespace)
    os.makedirs(cachedir, exist_ok=True)
    return cachedir
def cachedir ( namespace = None ) : cachehome = os . getenv ( 'XDG_CACHE_HOME' ) if not cachehome : cachehome = os . path . join ( os . getenv ( 'HOME' ) , '.cache' ) cachedir = os . path . join ( cachehome , 'pwndbg' ) if namespace : cachedir = os . path . join ( cachedir , namespace ) os . makedirs ( cachedir , exist_ok = True ) return cachedir