You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44Lines changed: 44 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,19 @@ This package contains a cache wrapper for the SOAP engine.
11
11
12
12
Want more information about the future of this project? Check out this list of the [next big projects](https://github.com/php-soap/.github/blob/main/PROJECTS.md) we'll be working on.
13
13
14
+
# Prerequisites
15
+
16
+
You can choose what cache implementation you want to use.
17
+
This package expects some PSR implementations to be present in order to be installed:
18
+
19
+
* PSR-7: `psr/cache-implementation` like `symfony/cache` or `cache/*`
20
+
21
+
Example:
22
+
23
+
```sh
24
+
$ composer require symfony/cache
25
+
```
26
+
14
27
# Installation
15
28
16
29
```shell
@@ -23,8 +36,23 @@ This package provides engines that can be used in a generic way:
23
36
24
37
### CachedEngine
25
38
39
+
You can cache a complete engine so that you don't have to reload a WSDL on every HTTP request.
26
40
27
41
```php
42
+
use PhpSoap\CachedEngine\CachedEngine;
43
+
use Soap\CachedEngine\CacheConfig;
44
+
use Soap\Engine\Engine;
45
+
46
+
$engine = new CachedEngine(
47
+
$yourPsr6OrPsr16CachePool,
48
+
new CacheConfig(
49
+
key: 'cached-engine',
50
+
ttlInSeconds: 3600
51
+
),
52
+
static function (): Engine {
53
+
return new YourSoapEngine();
54
+
}
55
+
);
28
56
```
29
57
30
58
## Drivers
@@ -33,5 +61,21 @@ This package provides drivers that can be used in a generic way:
33
61
34
62
### CachedDriver
35
63
64
+
You can cache a complete driver so that you don't have to reload a WSDL on every HTTP request.
0 commit comments