Sha256: f15760736ef55d41d08d40d06a01e37bde0292e073b9860c61520632ad676c61
Contents?: true
Size: 1.34 KB
Versions: 3
Compression:
Stored size: 1.34 KB
Contents
Cacheability ============ A gem that makes client-side caching of HTTP requests a no-brainer. It is built upon the Rack:Cache gem from Ryan Tomayko. Cached data can be stored in heap, file or memcached. See the Rack::Cache documentation (http://tomayko.com/src/rack-cache/) for more information. Installation ============ gem install cryx-cacheability Usage ===== require 'cacheability/restclient' resource = RestClient::CacheableResource.new( 'http://some/cacheable/resource', :cache => { :metastore => 'file:/tmp/cache/meta', :entitystore => 'file:/tmp/cache/body' } ) resource.get # get from remote server, and cache if possible # ... resource.get # get from cache, if still fresh. # ... resource.get(:cache_control => 'no-cache') # explicitly tells to bypass the cache, requires rack-cache >= 0.4 # ... Do yourself a favor and read: * the HTTP specification related to HTTP caching - http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html * Things Caches Do - http://tomayko.com/writings/things-caches-do Supported libraries =================== * rest-client > 0.9 Dependencies ============ * rack-cache COPYRIGHT ========= Copyright (c) 2008 Cyril Rohr. See LICENSE for details.
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
cryx-cacheability-1.0.0 | README |
cryx-cacheability-1.1.0 | README |
cacheability-1.1.0 | README |