Lines Matching defs:cache

344     struct walk_cache_t *prev; /* Prev cache of same call in this (sub)req */
351 walk_cache_t *cache, *prev_cache, *copy_cache;
354 /* Find the most relevant, recent walk cache to work from and provide
356 * or internal redirect, this is the cache corresponding to the equivalent
358 * a cache exists. Otherwise it is the walk cache of the previous
360 * that exists; if not, then create a new walk cache.
385 cache = apr_pmemdup(r->pool, copy_cache, sizeof(*cache));
386 cache->walked = apr_array_copy(r->pool, cache->walked);
387 cache->prev = prev_cache;
388 cache->count = count;
391 cache = apr_pcalloc(r->pool, sizeof(*cache));
392 cache->walked = apr_array_make(r->pool, 4, sizeof(walk_walked_t));
395 *note = cache;
397 return cache;
566 walk_cache_t *cache;
587 * so we can begin by checking the cache for a recent directory walk.
606 cache = prep_walk_cache(AP_NOTE_DIRECTORY_WALK, r);
607 cached = (cache->cached != NULL);
655 && (cache->dir_conf_tested == sec_ent)
656 && (strcmp(entry_dir, cache->cached) == 0)) {
664 if (r->per_dir_config == cache->per_dir_result) {
668 if (r->per_dir_config == cache->dir_conf_merged) {
669 r->per_dir_config = cache->per_dir_result;
724 if (cache->walked->nelts) {
725 now_merged = ((walk_walked_t*)cache->walked->elts)
726 [cache->walked->nelts - 1].merged;
734 int matches = cache->walked->nelts;
736 walk_walked_t *last_walk = (walk_walked_t*)cache->walked->elts;
946 cache->walked->nelts -= matches;
960 last_walk = (walk_walked_t*)apr_array_push(cache->walked);
999 * this wouldn't work except that we cache the htaccess
1015 cache->walked->nelts -= matches;
1029 last_walk = (walk_walked_t*)apr_array_push(cache->walked);
1253 cache->walked->nelts -= matches;
1267 last_walk = (walk_walked_t*)apr_array_push(cache->walked);
1281 cache->walked->nelts -= matches;
1284 else if (cache->walked->nelts > cached_matches) {
1319 cache->cached = r->filename;
1322 cache->cached = ap_make_dirstr_parent(r->pool, r->filename);
1326 && r->per_dir_config == cache->dir_conf_merged) {
1327 r->per_dir_config = cache->per_dir_result;
1331 cache->dir_conf_tested = sec_ent;
1332 cache->dir_conf_merged = r->per_dir_config;
1334 /* Merge our cache->dir_conf_merged construct with the r->per_dir_configs,
1342 cache->per_dir_result = r->per_dir_config;
1355 walk_cache_t *cache;
1360 * We won't destroy the cache, just in case _this_ redirect is later
1367 cache = prep_walk_cache(AP_NOTE_LOCATION_WALK, r);
1368 cached = (cache->cached != NULL);
1384 /* If we have an cache->cached location that matches r->uri,
1389 && (cache->dir_conf_tested == sec_ent)
1390 && (strcmp(entry_uri, cache->cached) == 0)) {
1396 if (r->per_dir_config == cache->per_dir_result) {
1400 if (cache->walked->nelts) {
1401 now_merged = ((walk_walked_t*)cache->walked->elts)
1402 [cache->walked->nelts - 1].merged;
1410 int matches = cache->walked->nelts;
1412 walk_walked_t *last_walk = (walk_walked_t*)cache->walked->elts;
1416 cache->cached = entry_uri;
1468 ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
1469 : (strncmp(entry_core->d, cache->cached, len)
1472 && cache->cached[len] != '/'
1473 && cache->cached[len] != '\0')))) {
1492 cache->walked->nelts -= matches;
1506 last_walk = (walk_walked_t*)apr_array_push(cache->walked);
1520 cache->walked->nelts -= matches;
1523 else if (cache->walked->nelts > cached_matches) {
1529 && r->per_dir_config == cache->dir_conf_merged) {
1530 r->per_dir_config = cache->per_dir_result;
1534 cache->dir_conf_tested = sec_ent;
1535 cache->dir_conf_merged = r->per_dir_config;
1537 /* Merge our cache->dir_conf_merged construct with the r->per_dir_configs,
1545 cache->per_dir_result = r->per_dir_config;
1556 walk_cache_t *cache;
1573 cache = prep_walk_cache(AP_NOTE_FILE_WALK, r);
1574 cached = (cache->cached != NULL);
1577 * We won't destroy the cache, just in case _this_ redirect is later
1584 /* Get the basename .. and copy for the cache just
1595 /* If we have an cache->cached file name that matches test_file,
1600 && (cache->dir_conf_tested == sec_ent)
1601 && (strcmp(test_file, cache->cached) == 0)) {
1607 if (r->per_dir_config == cache->per_dir_result) {
1611 if (cache->walked->nelts) {
1612 now_merged = ((walk_walked_t*)cache->walked->elts)
1613 [cache->walked->nelts - 1].merged;
1621 int matches = cache->walked->nelts;
1623 walk_walked_t *last_walk = (walk_walked_t*)cache->walked->elts;
1627 cache->cached = test_file;
1651 if (ap_regexec(entry_core->r, cache->cached, nmatch, pmatch, 0)) {
1661 cache->cached + pmatch[i].rm_so,
1669 ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
1670 : strcmp(entry_core->d, cache->cached))) {
1688 cache->walked->nelts -= matches;
1702 last_walk = (walk_walked_t*)apr_array_push(cache->walked);
1716 cache->walked->nelts -= matches;
1719 else if (cache->walked->nelts > cached_matches) {
1725 && r->per_dir_config == cache->dir_conf_merged) {
1726 r->per_dir_config = cache->per_dir_result;
1730 cache->dir_conf_tested = sec_ent;
1731 cache->dir_conf_merged = r->per_dir_config;
1733 /* Merge our cache->dir_conf_merged construct with the r->per_dir_configs,
1741 cache->per_dir_result = r->per_dir_config;
1752 walk_cache_t *cache;
1766 * We won't destroy the cache, just in case _this_ redirect is later
1773 cache = prep_walk_cache(AP_NOTE_IF_WALK, r);
1774 cached = (cache->cached != NULL);
1775 cache->cached = (void *)1;
1776 matches = cache->walked->nelts;
1778 last_walk = (walk_walked_t*)cache->walked->elts;
1825 cache->walked->nelts -= matches;
1839 last_walk = (walk_walked_t*)apr_array_push(cache->walked);
1849 cache->walked->nelts -= matches;
1852 else if (cache->walked->nelts > cached_matches) {
1857 && r->per_dir_config == cache->dir_conf_merged) {
1858 r->per_dir_config = cache->per_dir_result;
1862 cache->dir_conf_tested = sec_ent;
1863 cache->dir_conf_merged = r->per_dir_config;
1865 /* Merge our cache->dir_conf_merged construct with the r->per_dir_configs,
1873 cache->per_dir_result = r->per_dir_config;
2258 * Resolve this symlink. We should tie this back to dir_walk's cache