README.md in githu3-0.0.5 vs README.md in githu3-0.0.6
- old
+ new
@@ -165,22 +165,22 @@
Githu3 provides a very basic cache mechanism to avoid making duplicate requests too often. Basically what it does is just record HTTP request results in a store with an expiration timeout and attempts to retrieve the results back from this store before hitting Github's servers. The different clients private data... should be safe, the request headers (that contain auth info) are used to generate the hash. 2 stores are provided by default : Redis and Disk.
To use them (these are the default options):
- disk_cached_client = Githu3::Client.new('myawesomelyverylongoauth2token', :cache => :disk, :cache_options => {
+ disk_cached_client = Githu3::Client.new('myawesomelyverylongoauth2token', :cache => :disk, :cache_config => {
:path => "/tmp/githu3",
:namespace => "cache", # or "myawesomelyverylongoauth2token" if you are paranoid...
- :expiration => 120 # in seconds
+ :expire => 120 # in seconds
})
require 'redis'
require 'redis-namespace'
- redis_cached_client = Githu3::Client.new('myawesomelyverylongoauth2token', :cache => :redis, :cache_options => {
+ redis_cached_client = Githu3::Client.new('myawesomelyverylongoauth2token', :cache => :redis, :cache_config => {
:host => "localhost", # defaults to localhost
:port => 6379 # defaults to 6379
:namespace => "githu3", # or "githu3:myawesomelyverylongoauth2token" if you are paranoid...
- :expiration => 120 # in seconds
+ :expire => 120 # in seconds
})
## Limitations / Known issues