Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbitron committed Jul 15, 2014
1 parent 1f1ca7d commit f2ee011
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
The PHP SimpleCache Class is an easy way to cache 3rd party API calls. To use the class:
# PHP SimpleCache

The PHP SimpleCache Class is an easy way to cache 3rd party API calls.

## Install

You can either download the class manually and "require":

```php
require('SimpleCache.php');
```

or you can install via [composer](https://getcomposer.org):

```javascript
{
"require": {
"gilbitron/php-simplecache": "~1.4"
}
}
```

## Usage

A very basic usage example:

```php
require('simpleCache.php');
require('SimpleCache.php');
$cache = new SimpleCache();
$latest_tweet = $cache->get_data('tweet', 'http://search.twitter.com/search.atom?q=from:gilbitron&rpp=1');
echo $latest_tweet;
Expand All @@ -10,7 +34,7 @@ echo $latest_tweet;
A more advanced example:

```php
require('simpleCache.php');
require('SimpleCache.php');
$cache = new SimpleCache();
$cache->cache_path = 'cache/';
$cache->cache_time = 3600;
Expand All @@ -26,6 +50,6 @@ if($data = $cache->get_cache('label')){
print_r($data);
```

PHP SimpleCache was created by [Gilbert Pellegrom](http://gilbert.pellegrom.me) from [Dev7studios](http://dev7studios.com)
## Credits

Want to say thanks? [Consider tipping me](https://www.gittip.com/gilbitron).
PHP SimpleCache was created by [Gilbert Pellegrom](http://gilbert.pellegrom.me) from [Dev7studios](http://dev7studios.com). Released under the MIT license.

0 comments on commit f2ee011

Please sign in to comment.