Skip to content

Commit

Permalink
Calculate check cache key from Mixer server's ReferencedAttributes (e…
Browse files Browse the repository at this point in the history
…nvoyproxy#104)

* first draft

* second draft

* fix referenced_test.

* update per comment.

* add some check cache tests.
  • Loading branch information
qiwzhang committed Aug 30, 2017
1 parent c6fbd2e commit c74804a
Show file tree
Hide file tree
Showing 19 changed files with 663 additions and 620 deletions.
21 changes: 4 additions & 17 deletions mixerclient/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ cc_library(
"src/attribute_converter.h",
"src/check_cache.cc",
"src/check_cache.h",
"src/cache_key_set.cc",
"src/cache_key_set.h",
"src/client_impl.cc",
"src/client_impl.h",
"src/delta_update.cc",
Expand All @@ -34,8 +32,8 @@ cc_library(
"src/global_dictionary.h",
"src/report_batch.cc",
"src/report_batch.h",
"src/signature.cc",
"src/signature.h",
"src/referenced.cc",
"src/referenced.h",
"src/quota_cache.cc",
"src/quota_cache.h",
"utils/md5.cc",
Expand Down Expand Up @@ -106,17 +104,6 @@ cc_test(
],
)

cc_test(
name = "cache_key_set_test",
size = "small",
srcs = ["src/cache_key_set_test.cc"],
linkstatic = 1,
deps = [
":mixer_client_lib",
"//external:googletest_main",
],
)

cc_test(
name = "check_cache_test",
size = "small",
Expand Down Expand Up @@ -173,9 +160,9 @@ cc_test(
)

cc_test(
name = "signature_test",
name = "referenced_test",
size = "small",
srcs = ["src/signature_test.cc"],
srcs = ["src/referenced_test.cc"],
linkstatic = 1,
deps = [
":mixer_client_lib",
Expand Down
4 changes: 0 additions & 4 deletions mixerclient/include/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ struct CheckOptions {
// Set to 0 will disable caching.
const int num_entries;

// Only the attributes in this set are used to caclculate cache key.
// If empty, check cache is disabled.
std::vector<std::string> cache_keys;

// If true, Check is passed for any network failures.
bool network_fail_open = true;
};
Expand Down
125 changes: 0 additions & 125 deletions mixerclient/src/cache_key_set.cc

This file was deleted.

62 changes: 0 additions & 62 deletions mixerclient/src/cache_key_set.h

This file was deleted.

53 changes: 0 additions & 53 deletions mixerclient/src/cache_key_set_test.cc

This file was deleted.

Loading

0 comments on commit c74804a

Please sign in to comment.