From 8481aacc2b97e7d685720bc64ee9b716470078c7 Mon Sep 17 00:00:00 2001 From: Matthew Turland Date: Wed, 13 Jan 2021 08:25:22 -0600 Subject: [PATCH] Fixes #113 Update outdated README caching example --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 24e70721..bb4441fc 100644 --- a/README.md +++ b/README.md @@ -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