Returns the file path for the given cache object.
504254
def get_file(self, cache_id_obj, section=None):
        """"""
        section = "default" if section is None else section
        if "/" in section:
            raise ValueError("invalid section '{0}'".format(section))
        cache_id = "{:08x}".format(
            zlib.crc32(b"&".join(sorted([
                str(k).encode('utf8') + b"=" + str(v).encode('utf8')
                for k, v in cache_id_obj.items()
            ]))) & 0xffffffff)
        return os.path.join(self._full_base,
                            os.path.join(section,
                                         os.path.join(
                                             "{0}".format(cache_id[:2]),
                                             "{0}.tmp".format(cache_id[2:]))))
1126953
def _get_cache_file_path(self, cache_dir=None):
        
        if cache_dir is None:
            # Tries to get writable cache dir with fallback to users data dir
            # and temp directory
            cache_dir = self._get_writable_cache_dir()
        else:
            if not os.access(cache_dir, os.W_OK):
                raise CacheFileError("None of cache directories is writable.")

        # get directory for cached file
        return os.path.join(cache_dir, self._CACHE_FILE_NAME)
1265888
def lookup(self, name):
        '''  '''
        if name not in self.cache or DEBUG:
            for path in self.path:
                fpath = os.path.join(path, name)
                if os.path.isfile(fpath):
                    if self.cachemode in ('all', 'found'):
                        self.cache[name] = fpath
                    return fpath
            if self.cachemode == 'all':
                self.cache[name] = None
        return self.cache[name]
142255
def get_cache_location(self):
        
        filename = self.cache_path if \
            self.cache_path[-1:] == '/' else \
            self.cache_path + '/'
        filename += self.cache_file
        return filename
467623
def get_file_path(self, digest):
        
        relPath = Fsdb.generate_tree_path(digest, self._conf['depth'])
        return os.path.join(self.fsdbRoot, relPath)
1195410
protected function getFilepath(string $key):string{
		$h = hash('sha256', $key);

		return $this->cachedir.$h[0].DIRECTORY_SEPARATOR.$h[0].$h[1].DIRECTORY_SEPARATOR.$h;
	}
1162888
private String getFileFromCache(String filename) {
        LRUCache.CacheEntry<String, T> cachedTemplate = cache.get(filename);

        if (cachedTemplate == null) {
            return null;
        }

        return cache.get(filename).raw;
    }
1104965
def get_path(url):
        

        if url not in URLHelper.__cache:
            URLHelper.__cache[url] = urlparse(url)

        return URLHelper.__cache[url].path
502467
def GetLocalPath(self, inode, cache, database):
    
    local_path = cache.GetResults('local_path')
    if not local_path:
      results = database.Query(self.LOCAL_PATH_CACHE_QUERY)

      cache.CacheQueryResults(
          results, 'local_path', 'child_inode_number',
          ('parent_inode_number', 'filename'))
      local_path = cache.GetResults('local_path')

    parent, path = local_path.get(inode, [None, None])

    # TODO: Read the local_sync_root from the sync_config.db and use that
    # for a root value.
    root_value = '%local_sync_root%/'

    if not path:
      return root_value

    paths = []
    while path:
      paths.append(path)
      parent, path = local_path.get(parent, [None, None])

    if not paths:
      return root_value

    # Paths are built top level to root so we need to reverse the list to
    # represent them in the traditional order.
    paths.reverse()
    return root_value + '/'.join(paths)
902252
def cache_key(self):
        """"""
        try:
            return self.path
        except TypeError:
            raise TypeError("self.path is invalild: '{}', '{}'".format(str(self.path), type(self.path)))
448696
def _get_cache_filename(name, filename):
    """"""
    filename = os.path.abspath(filename)[1:]
    home_folder = os.path.expanduser('~')
    base_cache_dir = os.path.join(home_folder, '.git-lint', 'cache')

    return os.path.join(base_cache_dir, name, filename)
107778
File getCacheFile(TemplateClass tc) {
        String id = cacheFileName(tc, ".rythm");
        return getCacheFile(id);
    }
971451
function getCacheFilePaths(props: {
  filePath: string,
  transformOptions: TransformOptions,
}): CacheFilePaths {
  const hasher = imurmurhash()
    .hash(props.filePath)
    .hash(jsonStableStringify(props.transformOptions) || '');
  const hash = toFixedHex(8, hasher.result());
  const prefix = hash.substr(0, 2);
  const fileName = `${hash.substr(2)}${path.basename(props.filePath)}`;
  const base = path.join(getCacheDirPath(), prefix, fileName);
  return {transformedCode: base, metadata: base + '.meta'};
}
190524
def get_pants_cachedir():
  """"""
  # Follow the unix XDB base spec: http://standards.freedesktop.org/basedir-spec/latest/index.html.
  cache_home = os.environ.get('XDG_CACHE_HOME')
  if not cache_home:
    cache_home = '~/.cache'
  return os.path.expanduser(os.path.join(cache_home, 'pants'))
90308
def _cache_directory(self):
        
        if settings.unit_testing_mode or settings.use_test_cache:
            return os.path.join(settings.cache_directory.replace("Fortpy", "Fortpy_Testing"), self.py_tag)
        else:
            return os.path.join(settings.cache_directory, self.py_tag)
648689
def local_path(self, url, filename=None, decompress=False, download=False):
        
        if download:
            return self.fetch(url=url, filename=filename, decompress=decompress)
        else:
            filename = self.local_filename(url, filename, decompress)
            return join(self.cache_directory_path, filename)
602271
public static String generateCacheFileFullPath(Uri fileOriginalUri, File cacheDir, long createdTime) {
		String source = fileOriginalUri.toString() + Long.toString(createdTime);
		String fileName = md5(source);
		File cacheFile = new File(cacheDir, fileName);
		return cacheFile.getPath();
	}