Return the cache file name for an entry with a given id.
323282
def __filename(self, id):
        """"""
        suffix = self.fnsuffix()
        filename = "%s-%s.%s" % (self.fnprefix, id, suffix)
        return os.path.join(self.location, filename)
878438
def filename(self, type_, id_):
        
        profile = self.connection.profile
        return os.path.join(self.directory, profile, type_, str(id_))
15382
function cacheKey (id) {
    //  get cache id
    var cacheId = stableId({
        columnsId: this.cache.model.columnsId,
        modelViewInstanceIds: this.modelViewInstanceIds,
        recordIds: this.ids,
    })
    // create cache key
    return `${this.cache.model.name}:view:id:collection:${cacheId}`
}
1281401
protected function urlFormat($id, $url_fmt, $properties_cache): string
	{
		if (isset($url_fmt)) {
			if ($properties_cache === null) {
				// URL contains ID only, so there is no need to load properties.
				return Utils::filename_format($url_fmt, array_combine($this->describeId(), (array) $id));
			} else {
				// However, if properties are in cache, it is better to use them.
				return Utils::filename_format($url_fmt, $properties_cache);
			}
		} else {
			// Default fallback to something reasonable. It might not work, but meh.
			return '/'.$this->machine_type.'/'.(is_array($id) ? join('/', $id) : $id);
		}
	}
164335
def get(self, entry):
        """"""
        try:
            list = self.cache[entry.key]
            return list[list.index(entry)]
        except:
            return None
605508
def get_category_by_id(self, cid):
        
        self._cache_init()
        return self._cache_get_entry(self.CACHE_NAME_IDS, cid)
669913
def ensure_cache_id(self, cache_id_obj):
        """"""
        cache_id = self._get_canonical_id(cache_id_obj)
        if cache_id != self._cache_id_obj:
            raise ValueError(
                "cache mismatch {0} != {1}".format(
                    cache_id, self._cache_id_obj))
1197984
function cacheKey (id) {
    //  get cache id
    var cacheId = stableId({
        columnsId: this.cache.model.columnsId,
        modelViewInstanceIds: this.modelViewInstanceIds,
        recordId: id,
    })
    // create cache key
    return `${this.cache.model.name}:view:id:record:${cacheId}`
}
1072177
def is_file_modified(self, id_, signature):
        

        entry = self.__entries.get(id_)
        if entry is None:
            raise ValueError("Invalid filename id_ (%d)" % id_)

        # Is the signature already known?
        if entry.sig_valid:
            # use the cached signature
            filesig = entry.signature
        else:
            # compute the signature and store it
            filesig = self._get_signature(entry)
            entry.signature = filesig
            entry.sig_valid = True

        return filesig != signature
1000162
private String getIdFromFilename(String filename) {
        if (!StringUtils.hasText(filename) || filename.indexOf('_') < 0) {
            return null;
        }
        return filename.substring(0, filename.lastIndexOf('_'));
    }
531773
def _load_cache(self, filename):
        """"""
        try:
            with open(filename + self.CACHE_EXTENSION, 'rb') as file:
                prev_number_of_pages, prev_page_references = pickle.load(file)
        except (IOError, TypeError):
            prev_number_of_pages, prev_page_references = {}, {}
        return prev_number_of_pages, prev_page_references
1099375
def acquire_filename(self, name):
        

        id_ = self.__id_lut.get(name)
        # Is this a new entry?
        if id_ is None:
            # then create one...
            id_ = self.__next_id
            self.__next_id += 1
            self.__id_lut[name] = id_
            entry = filename_entry_t(name)
            self.__entries[id_] = entry
        else:
            # otherwise obtain the entry...
            entry = self.__entries[id_]

        entry.inc_ref_count()
        return id_, self._get_signature(entry)
1264418
private function getDirectoryAndFilenameFromKey($cacheKey) {

        if (!is_array($cacheKey)) {
            $cacheKey = array($cacheKey);
        }

        $filename = array_pop($cacheKey);
        $dir = $this->cacheBaseDir . "/" . join("/", $cacheKey);


        // Return dir and filename
        return array($dir, $filename);

    }
365779
def _get_cache_key(self, obj):
        """"""
        if obj is not None:
            # Make sure that key is REALLY unique.
            return '{}-{}'.format(id(self), obj.pk)

        return "{}-None".format(id(self))
1162888
private String getFileFromCache(String filename) {
        LRUCache.CacheEntry<String, T> cachedTemplate = cache.get(filename);

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

        return cache.get(filename).raw;
    }
613204
def _all_filenames(self):
        """"""
        try:
            return [os.path.join(self.cache_dir, filename) for filename in
                    os.listdir(self.cache_dir)]
        except (FileNotFoundError, OSError):
            return []
362254
def _getf(self, id):
        """"""
        try:
            filename = self.__filename(id)
            self.__remove_if_expired(filename)
            return self.__open(filename, "rb")
        except Exception:
            pass