diff --git a/include/clixon_custom.h b/include/clixon_custom.h index 040880db..3d084f6a 100644 --- a/include/clixon_custom.h +++ b/include/clixon_custom.h @@ -127,12 +127,6 @@ */ #undef LIST_PAGINATION_REMAINING -/*! Use Ancestor config cache - * - * The cache uses two yang stmt flag bits. One to say it is active, the second its value - */ -#define USE_CONFIG_FLAG_CACHE - /*! If backend is restarted, cli and netconf client will retry (once) and reconnect * * Note, if client has locked or had edits in progress, these will be lost diff --git a/lib/clixon/clixon_yang.h b/lib/clixon/clixon_yang.h index da1b31da..51914ba3 100644 --- a/lib/clixon/clixon_yang.h +++ b/lib/clixon/clixon_yang.h @@ -61,10 +61,8 @@ #define YANG_FLAG_INDEX 0x08 /* This yang node under list is (extra) index. --> you can access * list elements using this index with binary search */ #endif -#ifdef USE_CONFIG_FLAG_CACHE #define YANG_FLAG_CONFIG_CACHE 0x10 /* Ancestor config cache is active */ #define YANG_FLAG_CONFIG_VALUE 0x20 /* Ancestor config cache value */ -#endif #define YANG_FLAG_DISABLED 0x40 /* Disabled due to if-feature evaluate to false * Transformed to ANYDATA but some code may need to check diff --git a/lib/src/clixon_yang.c b/lib/src/clixon_yang.c index 2be6aa25..2ef0ec6a 100644 --- a/lib/src/clixon_yang.c +++ b/lib/src/clixon_yang.c @@ -3494,29 +3494,21 @@ yang_config_ancestor(yang_stmt *ys) yp = ys; do { -#ifdef USE_CONFIG_FLAG_CACHE if (yang_flag_get(yp, YANG_FLAG_CONFIG_CACHE)) return yang_flag_get(yp, YANG_FLAG_CONFIG_VALUE)?1:0; -#endif if (yang_config(yp) == 0){ -#ifdef USE_CONFIG_FLAG_CACHE yang_flag_set(yp, YANG_FLAG_CONFIG_CACHE); yang_flag_reset(yp, YANG_FLAG_CONFIG_VALUE); -#endif return 0; } if (yang_keyword_get(yp) == Y_INPUT || yang_keyword_get(yp) == Y_OUTPUT || yang_keyword_get(yp) == Y_NOTIFICATION){ -#ifdef USE_CONFIG_FLAG_CACHE yang_flag_set(yp, YANG_FLAG_CONFIG_CACHE); yang_flag_reset(yp, YANG_FLAG_CONFIG_VALUE); -#endif return 0; } } while((yp = yang_parent_get(yp)) != NULL); -#ifdef USE_CONFIG_FLAG_CACHE yang_flag_set(ys, YANG_FLAG_CONFIG_CACHE); yang_flag_set(ys, YANG_FLAG_CONFIG_VALUE); -#endif return 1; }