summaryrefslogtreecommitdiff
path: root/source3/utils/net_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/net_cache.c')
-rw-r--r--source3/utils/net_cache.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source3/utils/net_cache.c b/source3/utils/net_cache.c
index 74d8d29b4b..36cd12fb82 100644
--- a/source3/utils/net_cache.c
+++ b/source3/utils/net_cache.c
@@ -297,6 +297,21 @@ static int net_cache_flush(struct net_context *c, int argc, const char **argv)
return 0;
}
+static int net_cache_stabilize(struct net_context *c, int argc,
+ const char **argv)
+{
+ if (c->display_usage) {
+ d_printf("Usage:\n"
+ "net cache flush\n"
+ " Delete all cache entries.\n");
+ return 0;
+ }
+
+ if (!gencache_stabilize()) {
+ return -1;
+ }
+ return 0;
+}
/**
* Entry point to 'net cache' subfunctionality
*
@@ -362,6 +377,14 @@ int net_cache(struct net_context *c, int argc, const char **argv)
"net cache flush\n"
" Delete all cache entries"
},
+ {
+ "stabilize",
+ net_cache_stabilize,
+ NET_TRANSPORT_LOCAL,
+ "Move transient cache content to stable storage",
+ "net cache stabilize\n"
+ " Move transient cache content to stable storage"
+ },
{NULL, NULL, 0, NULL, NULL}
};