}
/* For the sake of brevity... */
- asprintf(&result, "{ "cache_size": %d }\n", kr_cache_count(&txn));
+ asprintf(&result, "{ \"size\": %d }\n", kr_cache_count(&txn));
kr_cache_txn_abort(&txn);
return result;
{
static struct kr_prop prop_list[] = {
/* Callback, Name, Description */
- { &cache_size, "size", "Return number of cached records.", },
+ { &cached_size, "size", "Return number of cached records.", },
{ NULL, NULL, NULL }
};
return prop_list;
```sh
$ kresolved
...
+[system] started in interactive mode, type 'help'
> load cached
> cached.cached_size
{ "cache_size": 53 }
[processing]: https://gitlab.labs.nic.cz/labs/knot/tree/master/src/libknot/processing
[golang-syntax]: http://blog.golang.org/gos-declaration-syntax
[cgo]: http://golang.org/cmd/cgo/
-[gccgo]: https://golang.org/doc/install/gccgo
\ No newline at end of file
+[gccgo]: https://golang.org/doc/install/gccgo