MCPcopy Create free account
hub / github.com/apache/trafficserver / CB_cmd_cache_check

Function CB_cmd_cache_check

src/traffic_server/traffic_server.cc:858–878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

856}
857
858void
859CB_cmd_cache_check()
860{
861 int res = 0;
862 if (cacheProcessor.IsCacheEnabled() == CACHE_INITIALIZED) {
863 res = cacheProcessor.dir_check(false) < 0 || res;
864 cacheProcessor.stop();
865 const char *n = "CHECK";
866
867 if (res) {
868 printf("\n%s failed", n);
869 ::exit(1);
870 } else {
871 printf("\n%s succeeded\n", n);
872 ::exit(0);
873 }
874 } else if (cacheProcessor.IsCacheEnabled() == CACHE_INIT_FAILED) {
875 Note("unable to open Cache, Check failed");
876 ::exit(1);
877 }
878}
879
880int
881cmd_check_internal(char * /* cmd ATS_UNUSED */, bool fix = false)

Callers

nothing calls this directly

Calls 3

IsCacheEnabledMethod · 0.80
dir_checkMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected