- 授权协议: Apache
- 开发语言: Ruby
- 操作系统: 跨平台
- 软件首页: https://github.com/plataformatec/faraday-http-cache
- 软件文档: https://github.com/plataformatec/faraday-http-cache
软件介绍
Faraday Http Cache 是一个 Faraday 的扩展,实现了 HTTP 的缓存。通过检查过期时间来验证已存储的响应信息。
使用方法:
client = Faraday.new do |builder| builder.use :http_cache, store: Rails.cache # or builder.use Faraday::HttpCache, store: Rails.cache builder.adapter Faraday.default_adapter end
使用 Memcached:
# Connect the middleware to a Memcache instance. store = ActiveSupport::Cache.lookup_store(:mem_cache_store, ['localhost:11211']) client = Faraday.new do |builder| builder.use :http_cache, store: store builder.adapter Faraday.default_adapter end # Or use the Rails.cache instance inside your Rails app. client = Faraday.new do |builder| builder.use :http_cache, store: Rails.cache builder.adapter Faraday.default_adapter end
日志:
client = Faraday.new do |builder|
builder.use :http_cache, store: Rails.cache, logger: Rails.logger
builder.adapter Faraday.default_adapter
end
client.get('http://site/api/users')
# logs "HTTP Cache: [GET users] miss, store"Python学习手册(第4版)
[美] Mark Lutz / 李军、刘红伟 / 机械工业出版社 / 2011-4 / 119.00元
Google和YouTube由于Python的高可适应性、易于维护以及适合于快速开发而采用它。如果你想要编写高质量、高效的并且易于与其他语言和工具集成的代码,《Python学习手册:第4 版》将帮助你使用Python快速实现这一点,不管你是编程新手还是Python初学者。本书是易于掌握和自学的教程,根据作者Python专家Mark Lutz的著名培训课程编写而成。 《Python学习手册:第......一起来看看 《Python学习手册(第4版)》 这本书的介绍吧!
HTML 压缩/解压工具
在线压缩/解压 HTML 代码
SHA 加密
SHA 加密工具
