Lines Matching full: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) in lws_cache_schedule() argument
48 lwsl_cache("%s: %s schedule %llu\n", __func__, cache->info.name, in lws_cache_schedule()
51 lws_sul_schedule(cache->info.cx, cache->info.tsi, &cache->sul, cb, in lws_cache_schedule()
56 lws_cache_write_through(struct lws_cache_ttl_lru *cache, in lws_cache_write_through() argument
60 struct lws_cache_ttl_lru *levels[LWS_CACHE_MAX_LEVELS], *c = cache; in lws_cache_write_through()
63 lws_cache_item_remove(cache, specific_key); in lws_cache_write_through()
72 /* starting from outermost cache level */ in lws_cache_write_through()
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, in lws_cache_lookup() argument
94 struct lws_cache_ttl_lru *l1 = cache; in lws_cache_lookup()
118 while (cache->info.parent) in lws_cache_lookup()
119 cache = cache->info.parent; in lws_cache_lookup()
121 if (cache->info.ops->lookup(cache, wildcard_key, &results_owner)) { in lws_cache_lookup()
132 * the cache, and we want to know the earliest expiry of any of the in lws_cache_lookup()
133 * component parts, so the meta cache entry for these results can be in lws_cache_lookup()
203 lws_cache_item_get(struct lws_cache_ttl_lru *cache, const char *specific_key, in lws_cache_item_get() argument
206 while (cache) { in lws_cache_item_get()
207 if (!cache->info.ops->get(cache, specific_key, pdata, psize)) { in lws_cache_item_get()
212 cache = cache->info.parent; in lws_cache_item_get()
219 lws_cache_expunge(struct lws_cache_ttl_lru *cache) in lws_cache_expunge() argument
223 while (cache) { in lws_cache_expunge()
224 ret |= cache->info.ops->expunge(cache); in lws_cache_expunge()
226 cache = cache->info.parent; in lws_cache_expunge()
233 lws_cache_item_remove(struct lws_cache_ttl_lru *cache, const char *wildcard_key) in lws_cache_item_remove() argument
235 while (cache) { in lws_cache_item_remove()
236 if (cache->info.ops->invalidate(cache, wildcard_key)) in lws_cache_item_remove()
239 cache = cache->info.parent; in lws_cache_item_remove()
246 lws_cache_footprint(struct lws_cache_ttl_lru *cache) in lws_cache_footprint() argument
248 return cache->current_footprint; in lws_cache_footprint()
252 lws_cache_debug_dump(struct lws_cache_ttl_lru *cache) in lws_cache_debug_dump() argument
255 if (cache->info.ops->debug_dump) in lws_cache_debug_dump()
256 cache->info.ops->debug_dump(cache); in lws_cache_debug_dump()
290 lws_cache_ttl_lru_t *cache = *_cache; in lws_cache_destroy() local
292 if (!cache) in lws_cache_destroy()
295 assert(cache->info.ops->destroy); in lws_cache_destroy()
297 lws_sul_cancel(&cache->sul); in lws_cache_destroy()
299 cache->info.ops->destroy(_cache); in lws_cache_destroy()