Returns the cache directory used for unpacked resources.
182745
public static File getCacheDir ()
    {
        if (_tmpdir == null) {
            String tmpdir = System.getProperty("java.io.tmpdir");
            if (tmpdir == null) {
                log.info("No system defined temp directory. Faking it.");
                tmpdir = System.getProperty("user.home");
            }
            setCacheDir(new File(tmpdir));
        }
        return _tmpdir;
    }
1352139
public function getCachePath(): string
    {
        $path = $this->getRuntimePath() . DIRECTORY_SEPARATOR . 'cache';
        FileHelper::createDirectory($path);
        return $path;
    }
767311
def _get_cache_dir():
    '''
    
    '''

    cache_dir = os.path.join(__opts__['cachedir'], 'pillar_s3fs')

    if not os.path.isdir(cache_dir):
        log.debug('Initializing S3 Pillar Cache')
        os.makedirs(cache_dir)

    return cache_dir
446286
def find_cache_directory(remote):
    
    return os.path.join('/var/cache/vcs-repo-mgr' if os.access('/var/cache', os.W_OK) else tempfile.gettempdir(),
                        urlparse.quote(remote, safe=''))
1132269
def read_cache(self):
        """"""
        if os.path.exists(self._cache_file):
            self._cache = read_cache_file(self._cache_file)
        else:
            self._cache = {}
530468
def _get_cache_path(source_file):
    
    local_name = os.path.basename(source_file)
    cache_name = local_name + ".db"
    cache_dir = os.path.join(current_app.instance_path, "classifier")

    if not os.path.isdir(cache_dir):
        os.makedirs(cache_dir)

    return os.path.abspath(os.path.join(cache_dir, cache_name))
996730
def artifact_cache_dir(self):
    """"""
    return (self.get_options().artifact_cache_dir or
            os.path.join(self.scratch_dir, 'artifacts'))
746740
public function getCacheDir()
    {
        static $dir;
        if (empty($dir)) {
            $dir = $this->getOpenDir() . '/cache/';

            if (!is_dir($dir)) {
                mkdir($dir, 0755, true);
            }
        }
        return $dir;
    }
372627
public function getCacheDir()
    {
        $dir=$this->m_cacheDir;
        if(empty($dir)){
            $dir=__DIR__."/../../../../../../_cache";
        }
        if(!file_exists($dir)){
            File::createDir($dir);
        }
        return rtrim($dir)."/";
    }
1306550
def cache_file(self, path, saltenv='base', cachedir=None, source_hash=None):
        '''
        
        '''
        return self.get_url(
            path, '', True, saltenv, cachedir=cachedir, source_hash=source_hash)
193726
def cache(self):
        """"""
        cache = self._cache or self.app.config.get('COLLECTIONS_CACHE')
        return import_string(cache) if isinstance(cache, six.string_types) \
            else cache
403113
def cache_get(cache_dir, cache_key, default=None):
    
    filename = os.path.join(cache_dir, cache_key)

    if os.path.isfile(filename):
        with open(filename, 'r') as f:
            return f.read()

    return default
773393
def cache_resource(dest_dir=@local_cache_dir, options={})
      unless dest_dir
        raise ArgumentError, "Must specify destination directory when creating resource", caller
      end
      self.local_cache_dir=dest_dir
      @size = update_cache(@url, @local_path, options)
      if options[:include_pack_gz]
        @relative_local_path_pack_gz = "#{@relative_local_path}.pack.gz"
        @local_path_pack_gz = "#{dest_dir}/#{@relative_local_path_pack_gz}"
        @size_pack_gz = update_cache(@url_pack_gz, @local_path_pack_gz, options)
      end
      @signature_verified ? @size : @signature_verified
    end
1090107
def ensure_app_cache_dir(appname, *args):
    
    import utool as ut
    dpath = get_app_cache_dir(appname, *args)
    ut.ensuredir(dpath)
    return dpath
1141537
def _get_cache_dir(candidate):
    """"""
    if candidate:
        return candidate

    import distutils.dist  # suppress(import-error)
    import distutils.command.build  # suppress(import-error)
    build_cmd = distutils.command.build.build(distutils.dist.Distribution())
    build_cmd.finalize_options()
    cache_dir = os.path.abspath(build_cmd.build_temp)

    # Make sure that it is created before anyone tries to use it
    try:
        os.makedirs(cache_dir)
    except OSError as error:
        if error.errno != errno.EEXIST:
            raise error

    return cache_dir
227569
def in_cache_dir(*paths)
      paths.reduce(cache_dir) do |base, path|
        Jekyll.sanitized_path(base, path)
      end
    end
798262
def get_srtm_dir(self):
        
        # Local cache path:
        result = ""
        if 'HOME' in mod_os.environ:
            result = mod_os.sep.join([mod_os.environ['HOME'], '.cache', 'srtm'])
        elif 'HOMEPATH' in mod_os.environ:
            result = mod_os.sep.join([mod_os.environ['HOMEPATH'], '.cache', 'srtm'])
        else:
            raise Exception('No default HOME directory found, please specify a path where to store files')

        if not mod_path.exists(result):
            mod_os.makedirs(result)

        return result