class Async::HTTP::Cache::General
def cacheable?(request)
def cacheable?(request) # We don't support caching requests which have a body: if request.body return false end # We can't cache upgraded requests: if request.protocol return false end # We only support caching GET and HEAD requests: unless request.method == 'GET' || request.method == 'HEAD' return false end if request.headers[AUTHORIZATION] return false end if request.headers[COOKIE] return false end # Otherwise, we can cache it: return true end