Browse files

add readme info for cache

  • Loading branch information...
1 parent 0694a49 commit 977dc589e53f5e30e5e5f1947075663a1b063a33 @docteurklein docteurklein committed Nov 14, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 README.markdown
View
15 README.markdown
@@ -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.

0 comments on commit 977dc58

Please sign in to comment.