'Get the directory corresponding to the cache for the
function.'

def _get_func_dir(self, mkdir=True):

    func_dir = _cache_key_to_dir(self.cachedir, self.func, None)
    if mkdir:
        mkdirp(func_dir)
    return func_dir
