Skip to content
Snippets Groups Projects
Verified Commit a6360912 authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

cache.get(): disable again, for now

We need to think about the API carefully.
parent 720683ed
No related branches found
No related tags found
1 merge request!633lua: resurrect cache.clear('name')
......@@ -30,7 +30,7 @@ Improvements
- bring in performace improvements provided by libknot 2.7
- old name "Knot DNS Resolver" is replaced by unambiguous "Knot Resolver"
to prevent confusion with "Knot DNS" authoritative server
- lua: resurrect cache.clear('name')
Knot Resolver 2.4.1 (2018-08-02)
================================
......@@ -49,9 +49,6 @@ Bugfixes
This fixes lower hit rate in NSEC3 zones (since 2.4.0).
- minor TCP and TLS fixes (!623, !624, !626)
Improvements
------------
- lua: resurrect cache.get('name') and cache.clear('name'), with caveats
Knot Resolver 2.4.0 (2018-07-03)
================================
......
......@@ -827,6 +827,10 @@ daemons or manipulated from other processes, making for example synchronised loa
.. function:: cache.get([domain])
This function is not implemented at this moment.
We plan to re-introduce it soon, probably with a slightly different API.
..
:return: table of records in cache matching the prefix
.. error:: **Caveats:**
......
......@@ -1075,6 +1075,7 @@ static int cache_close(lua_State *L)
return 1;
}
#if 0
/** @internal Prefix walk. */
static int cache_prefixed(struct kr_cache *cache, const char *prefix, bool exact_name,
knot_db_val_t keyval[][2], int maxcount)
......@@ -1087,6 +1088,7 @@ static int cache_prefixed(struct kr_cache *cache, const char *prefix, bool exact
/* Start prefix search */
return kr_cache_match(cache, buf, exact_name, keyval, maxcount);
}
#endif
/** Prune expired/invalid records. */
static int cache_prune(lua_State *L)
......@@ -1134,6 +1136,7 @@ static int cache_clear_everything(lua_State *L)
return 1;
}
#if 0
/** @internal Dump cache key into table on Lua stack. */
static void cache_dump(lua_State *L, knot_db_val_t keyval[])
{
......@@ -1192,6 +1195,14 @@ static int cache_get(lua_State *L)
}
return 1;
}
#endif
static int cache_get(lua_State *L)
{
int ret = kr_error(ENOSYS);
format_error(L, kr_strerror(ret));
lua_error(L);
return ret;
}
/** Set time interval for cleaning rtt cache.
* Servers with score >= KR_NS_TIMEOUTED will be cleaned after
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment