|
|
|
@ -157,7 +157,7 @@ class TestServiceImpl : public TestService::Service { |
|
|
|
|
Status CacheableUnaryCall(ServerContext* context, const SimpleRequest* request, |
|
|
|
|
SimpleResponse* response) { |
|
|
|
|
gpr_timespec ts = gpr_now(GPR_CLOCK_PRECISE); |
|
|
|
|
std::string timestamp = std::to_string(ts.tv_nsec); |
|
|
|
|
std::string timestamp = std::to_string((long long unsigned)ts.tv_nsec); |
|
|
|
|
response->mutable_payload()->set_body(timestamp.c_str(), timestamp.size()); |
|
|
|
|
context->AddInitialMetadata("cache-control", "max-age=60, public"); |
|
|
|
|
return Status::OK; |
|
|
|
|