Sha256: a63a63d0253f491175e46ab9566d2bb452f2b28860266751a536fc9e3849e334
Contents?: true
Size: 415 Bytes
Versions: 2
Compression:
Stored size: 415 Bytes
Contents
module Restfulie::Client::Cache module Restrictions class << self # checks whether this request verb and its cache headers allow caching def may_cache?(response) may_cache_method?(response.method) && response.may_cache? end # only Post and Get requests are cacheable so far def may_cache_method?(verb) verb == :get || verb == :post end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
restfulie-0.9.3 | lib/restfulie/client/cache/restrictions.rb |
restfulie-0.9.1 | lib/restfulie/client/cache/restrictions.rb |