Skip to content

Commit

Permalink
add readme info for cache
Browse files Browse the repository at this point in the history
  • Loading branch information
docteurklein committed Nov 14, 2012
1 parent 0694a49 commit 977dc58
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ $repositories = $client->api('user')->repositories('ornicar');

From `$client` object, you can access to all GitHub.

## Cache usage

```php
<?php

// This file is generated by Composer
require_once 'vendor/autoload.php';

$client = new Github\Client(new CachedHttpClient(new FilesystemCache('/tmp/github-api-cache')));
```

Using cache, the client will get cached responses if resources haven't changed since last time,
**without** reaching the `X-Rate-Limit` [imposed by github](http://developer.github.com/v3/#rate-limiting).


## Documentation

See the `doc` directory for more detailed documentation.
Expand Down

0 comments on commit 977dc58

Please sign in to comment.