5. RFC 7234 - HTTP/1.1 Caching
A stored response can be considered fresh
if the response can be reused without validation
6. RFC 7234 - HTTP/1.1 Caching
Although caching is an entirely OPTIONAL feature of HTTP, it can be
assumed that reusing a cached response is desirable and that such
reuse is the default behavior when no requirement or local
configuration prevents it. Therefore, HTTP cache requirements are
focused on preventing a cache from either storing a non-reusable
response or reusing a stored response inappropriately, rather than
mandating that caches always store and reuse particular responses.
7. RFC 7234 - HTTP/1.1 Caching
Freshness
• s-max-age
• max age
• Expires
• heuristics
8. RFC 7234 - HTTP/1.1 Caching
Freshness
• s-max-age
• max age
• Expires
• heuristics
Last modified Last requested Now
Tid
14. Microsoft.Extensions.Caching
IMemoryCache
• Powered by dictionary
• Supports callback on
eviction.
• Has priority on items in
cache
• Compacts on GC Gen2
IDistributedCache
• MemoryCache
• Redis
• SQL Server
• You do the serialization
20. Redis
• http://redis.io
• Key value store + data structures
• By Salvatore Sanfilippo / @antirez
• Ansi C
• Single threaded
• Lua in server
• Microsoft research port to windows – nuget redis-64
• On Azure, AWS og Google cloud.