Lines Matching defs:cache
34 * Set *cache to NULL the first time before calling.
36 * You should call this each time before using the cache... if it's
41 * it just returns with *cache left alone; this costs very little. You should
43 * to lock the cache against deletion while you are using it.
52 * - the file is reloaded into a new lac and *cache set to that
54 * - the old cache lac, if any, is detached (so it will be freed when its
65 * [file contents] <--- *cache is set to here
78 lwsac_use_cached_file_start(lwsac_cached_file_t cache)
80 struct lwsac *lac = cache_file_to_lac(cache);
88 lwsac_use_cached_file_end(lwsac_cached_file_t *cache)
93 if (!cache || !*cache)
96 lac = cache_file_to_lac(*cache);
103 *cache = NULL; /* not usable any more */
109 lwsac_use_cached_file_detach(lwsac_cached_file_t *cache)
111 struct lwsac *lac = cache_file_to_lac(*cache);
122 *cache = NULL;
127 lwsac_cached_file(const char *filepath, lwsac_cached_file_t *cache, size_t *len)
130 lwsac_cached_file_t old = *cache;
141 info = (struct cached_file_info *)((*cache) - sizeof(*info));
176 * we either didn't cache it yet, or it has changed since we cached
203 *cache = (lwsac_cached_file_t)a;