Valinor/tests/Unit/Definition/Repository/Cache
Romain Canon 2d70efbfbb feat: extract file watching feature in own cache implementation
When the application runs in a development environment, the cache
implementation should be decorated with `FileWatchingCache` to prevent
invalid cache entries states, which can result in the library not
behaving as expected (missing property value, callable with outdated
signature, …).

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

if ($isApplicationInDevelopmentEnvironment) {
    $cache = new \CuyZ\Valinor\Cache\FileWatchingCache($cache);
}

(new \CuyZ\Valinor\MapperBuilder())
    ->withCache($cache)
    ->mapper()
    ->map(SomeClass::class, [/* … */]);
```

This behavior now forces to explicitly inject `FileWatchingCache`, when
it was done automatically before; but because it shouldn't be used in
a production environment, it will increase overall performance.
2022-05-23 20:28:02 +02:00
..
Compiler feat: extract file watching feature in own cache implementation 2022-05-23 20:28:02 +02:00
CacheClassDefinitionRepositoryTest.php refactor: remove unnecessary ClassSignature 2022-01-25 18:32:28 +01:00
CacheFunctionDefinitionRepositoryTest.php feat: introduce function definition repository 2022-02-19 19:58:28 +01:00