Lines Matching refs:cache
404 save(Codexcache_t* cache, Codex_t* code, const char* name, int namelen, Codexnum_t flags)
406 if (cache->code && cache->code != CODEXERROR)
408 if (cache->code->meth->closef)
409 (*cache->code->meth->closef)(cache->code);
410 else if (cache->code->data)
411 free(cache->code->data);
412 if (cache->code->dp)
413 sfclose(cache->code->dp);
414 free(cache->code);
416 cache->code = code;
417 cache->flags = flags;
418 strncopy(cache->name, name, namelen < sizeof(cache->name) ? (namelen + 1) : sizeof(cache->name));
419 cache->cached = ++codexstate.cached;
441 Codexcache_t* cache;
448 * check for matching inactive method in the cache
453 cache = 0;
466 for (cp = codexstate.cache; cp < &codexstate.cache[elementsof(codexstate.cache)]; cp++)
468 (cache = cp)->cached = 0;
474 if ((code = (cache = cp)->code) == CODEXERROR)
482 else if (!cache || cp->cached < cache->cached)
483 cache = cp;
589 if (cache)
590 save(cache, CODEXERROR, name, namelen, deen);
610 if (cache)
611 save(cache, code, name, namelen, deen);
641 if (cache)
678 if (cache)