Valinor/tests/Unit/Cache
Romain Canon 69ad3f4777 feat: allow injecting a cache implementation that is used by the mapper
The cache implementation that was previously injected in the mapper
builder must now be manually injected. This gives better control on when
the cache should be enabled, especially depending on which environment
the application is running.

The library provides a cache implementation out of the box, which saves
cache entries into the file system.

It is also possible to use any PSR-16 compliant implementation, as long
as it is capable of caching the entries handled by the library.

```php
$cache = new \CuyZ\Valinor\Cache\FileSystemCache('path/to/cache-dir');

(new \CuyZ\Valinor\MapperBuilder())
    ->withCache($cache)
    ->mapper()
    ->map(SomeClass::class, [/* … */]);
```
2022-05-23 20:28:02 +02:00
..
Compiled test: require and make use of vfsStream library 2022-05-08 16:48:15 +02:00
ChainCacheTest.php feat: initial release 2021-11-28 18:21:56 +01:00
FileSystemCacheTest.php feat: allow injecting a cache implementation that is used by the mapper 2022-05-23 20:28:02 +02:00
RuntimeCacheTest.php feat: initial release 2021-11-28 18:21:56 +01:00
VersionedCacheTest.php feat: initial release 2021-11-28 18:21:56 +01:00