Skip to content

Commit

Permalink
Fixes thephpleague#113 Update outdated README caching example
Browse files Browse the repository at this point in the history
  • Loading branch information
elazar authored and scaytrase committed Jan 13, 2021
1 parent a666a09 commit 8481aac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,10 @@ $validator = (new \League\OpenAPIValidation\PSR7\ValidatorBuilder)
->setCache($cachePool)
->getResponseValidator();
# or
\League\OpenAPIValidation\PSR15\ValidationMiddleware::fromYamlFile($yamlFile, $cachePool);
$psr15Middleware = (new \OpenAPIValidation\PSR15\ValidationMiddlewareBuilder)
->fromYamlFile($yamlFile)
->setCache($cachePool)
->getValidationMiddleware();
```

You can use `->setCache($pool, $ttl)` call for both PSR-7 and PSR-15 builder in order to set
Expand Down

0 comments on commit 8481aac

Please sign in to comment.