Kouhei Sutou
null+****@clear*****
Mon Jul 27 18:04:27 JST 2015
Kouhei Sutou 2015-07-27 18:04:27 +0900 (Mon, 27 Jul 2015) New Revision: b0ab7e3e2b8785fb678c7e04c1faf081061eeacb https://github.com/groonga/groonga/commit/b0ab7e3e2b8785fb678c7e04c1faf081061eeacb Message: logical_count: support cache Modified files: plugins/sharding/logical_count.rb Modified: plugins/sharding/logical_count.rb (+12 -0) =================================================================== --- plugins/sharding/logical_count.rb 2015-07-27 17:46:26 +0900 (bea79dc) +++ plugins/sharding/logical_count.rb 2015-07-27 18:04:27 +0900 (1d94750) @@ -25,6 +25,18 @@ module Groonga end private + def cache_key(input) + key = "logical_count\0" + key << "#{input[:logical_table]}\0" + key << "#{input[:shard_key]}\0" + key << "#{input[:min]}\0" + key << "#{input[:min_border]}\0" + key << "#{input[:max]}\0" + key << "#{input[:max_border]}\0" + key << "#{input[:filter]}\0" + key + end + def log_use_range_index(use, table_name, line, method) message = "[logical_count]" if use -------------- next part -------------- HTML����������������������������...Download