From b4346d77b64868a58cf2efc71533cd23a7ba86e2 Mon Sep 17 00:00:00 2001 From: lsvih Date: Fri, 5 May 2017 22:48:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E9=87=8F=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- solutions/system_design/query_cache/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/solutions/system_design/query_cache/README.md b/solutions/system_design/query_cache/README.md index 0d625ee0..9f160ccb 100644 --- a/solutions/system_design/query_cache/README.md +++ b/solutions/system_design/query_cache/README.md @@ -38,12 +38,12 @@ **如果你需要进行粗略的用量计算,请向你的面试官说明。** * 缓存存储的是键值对有序表,键为 `query`(查询),值为 `results`(结果)。 - * `query` - 50 bytes - * `title` - 20 bytes - * `snippet` - 200 bytes - * 总计:270 bytes + * `query` - 50 字节 + * `title` - 20 字节 + * `snippet` - 200 字节 + * 总计:270 字节 * 假如 100 亿次查询都是不同的,且全部需要存储,那么每个月需要 2.7 TB 的缓存空间 - * 单次查询 270 bytes * 每月查询 100 亿次 + * 单次查询 270 字节 * 每月查询 100 亿次 * 假设内存大小有限制,需要决定如何制定缓存过期规则 * 每秒 4,000 次请求