1# gRPC C++ Interceptors Example 2 3The C++ Interceptors example shows how interceptors might be used with a simple key-value store. Note that the C++ Interception API is still experimental and subject to change. 4 5## Key Value Store 6 7The key-value store service is defined in [keyvaluestore.proto](https://github.com/grpc/grpc/blob/master/examples/protos/keyvaluestore.proto).It has a simple bidi streaming RPC where the request messages contain a key and the response messages contain a value. 8 9The example shows a very naive CachingInterceptor added on the client channel that caches the key-value pairs that it sees. If the client looks up a key present in the cache, the interceptor responds with its saved value and the server doesn't see the request for that key. 10 11On the server-side, a very simple logging interceptor is added that simply logs to stdout whenever a new RPC is received. 12 13## Running the example 14 15To run the server - 16 17``` 18$ tools/bazel run examples/cpp/interceptors:server 19``` 20 21To run the client (on a different terminal) - 22 23``` 24$ tools/bazel run examples/cpp/interceptors:client 25``` 26