Lines Matching refs:cache

26 #include "private-lib-misc-cache-ttl.h"
46 lws_cache_schedule(struct lws_cache_ttl_lru *cache, sul_cb_t cb, lws_usec_t e)
48 lwsl_cache("%s: %s schedule %llu\n", __func__, cache->info.name,
51 lws_sul_schedule(cache->info.cx, cache->info.tsi, &cache->sul, cb,
56 lws_cache_write_through(struct lws_cache_ttl_lru *cache,
60 struct lws_cache_ttl_lru *levels[LWS_CACHE_MAX_LEVELS], *c = cache;
63 lws_cache_item_remove(cache, specific_key);
72 /* starting from outermost cache level */
84 * We want to make a list of unique keys that exist at any cache level
91 lws_cache_lookup(struct lws_cache_ttl_lru *cache, const char *wildcard_key,
94 struct lws_cache_ttl_lru *l1 = cache;
118 while (cache->info.parent)
119 cache = cache->info.parent;
121 if (cache->info.ops->lookup(cache, wildcard_key, &results_owner)) {
132 * the cache, and we want to know the earliest expiry of any of the
133 * component parts, so the meta cache entry for these results can be
203 lws_cache_item_get(struct lws_cache_ttl_lru *cache, const char *specific_key,
206 while (cache) {
207 if (!cache->info.ops->get(cache, specific_key, pdata, psize)) {
212 cache = cache->info.parent;
219 lws_cache_expunge(struct lws_cache_ttl_lru *cache)
223 while (cache) {
224 ret |= cache->info.ops->expunge(cache);
226 cache = cache->info.parent;
233 lws_cache_item_remove(struct lws_cache_ttl_lru *cache, const char *wildcard_key)
235 while (cache) {
236 if (cache->info.ops->invalidate(cache, wildcard_key))
239 cache = cache->info.parent;
246 lws_cache_footprint(struct lws_cache_ttl_lru *cache)
248 return cache->current_footprint;
252 lws_cache_debug_dump(struct lws_cache_ttl_lru *cache)
255 if (cache->info.ops->debug_dump)
256 cache->info.ops->debug_dump(cache);
290 lws_cache_ttl_lru_t *cache = *_cache;
292 if (!cache)
295 assert(cache->info.ops->destroy);
297 lws_sul_cancel(&cache->sul);
299 cache->info.ops->destroy(_cache);