Skip to content

Commit

Permalink
Add Caching doc
Browse files Browse the repository at this point in the history
  • Loading branch information
dcb9 committed Jul 18, 2016
1 parent 0dad02e commit 41b8e80
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,31 @@ public function actions()
[Demo](https://github.com/lichunqiang/yii2-swagger-demo)


Caching
-------

```
public function actions()
{
return [
// ...
'api' => [
// ...
'cache' => 'cache',
'cacheKey' => 'api-swagger-cache', // default is 'api-swagger-cache'
],
];
}
```

#### Clear cache

Access clear cache url `YOUR_API_URL?clear-cache` or `YOUR_API_URL?api_key=YOUR_API_KEY&clear-cache`

Example: `curl 'http://localhost/v1/swagger/api?clear-cache'`

you will see: `Succeed clear swagger api cache.`

License
-------
![MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)

0 comments on commit 41b8e80

Please sign in to comment.