2. What is Cache?
IF x is in the cache:
return x
ELSE
generate x
save x to cache
return x
13年10月9⽇日星期三
3. Cache in Web
given a URL, try finding that page in the
cache
if the page is in the cache:
return the cached page
else:
generate the page
save the generated page in the cache
return the generated page
13年10月9⽇日星期三
8. redis
•Redis is an open source, BSD licensed,
advanced key-value store. It is
often referred to as a data
structure server
13年10月9⽇日星期三
9. redis
•Redis is an open source, BSD licensed,
advanced key-value store. It is
often referred to as a data
structure server
•什麼是 data structure server?
13年10月9⽇日星期三
10. 基本款
• SET key value
• GET key
• INCR key
• EXPIRE key time
• TTL key
13年10月9⽇日星期三