Lines Matching defs:cache
154 lws_diskcache_finalize_name(char *cache)
158 strncpy(ren, cache, sizeof(ren) - 1);
160 p = strchr(cache, '~');
163 if (rename(ren, cache)) {
165 ren, cache);
177 const char *hash_hex, int *_fd, char *cache, int cache_len,
190 n = lws_snprintf(cache, (size_t)cache_len, "%s/%c/%c/%s", lds->cache_dir_base,
193 lwsl_info("%s: job cache %s\n", __func__, cache);
195 *_fd = open(cache, O_RDONLY);
210 /* "touch" the hit cache file so it's last for LRU now */
211 fd = open(cache, O_RDWR);
218 /* bots are too random to pollute the cache with their antics */
224 lws_snprintf(cache + n, (size_t)cache_len - (unsigned int)n, "~%d-%p", (int)getpid(),
227 *_fd = open(cache, O_RDWR | O_CREAT | O_TRUNC, 0600);
229 /* well... ok... we will proceed without cache then... */
230 lwsl_notice("%s: Problem creating cache %s: errno %d\n",
231 __func__, cache, errno);
246 * the dirs under the cache dir. Since we don't need or want a full list of
263 * big atomic operation, since the user may want a huge cache, so we look in
264 * one cache dir at a time and track state in the repodir struct.
457 * if the cache grew by 10%, would we hit the limit even then?
475 lwsl_info("%s: cache %s: %lldKiB / %lldKiB, next scan %ds\n", __func__,