|
5 | 5 | use Doctrine\ORM\EntityManager; |
6 | 6 | use Doctrine\ORM\EntityManagerInterface; |
7 | 7 | use Doctrine\Persistence\Mapping\Driver\MappingDriverChain; |
| 8 | +use Dot\Cache\Adapter\ArrayAdapter; |
| 9 | +use Dot\Cache\Adapter\FilesystemAdapter; |
8 | 10 | use Frontend\App\Resolver\EntityListenerResolver; |
9 | 11 | use Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType; |
10 | 12 | use Ramsey\Uuid\Doctrine\UuidBinaryType; |
|
26 | 28 | 'configuration' => [ |
27 | 29 | 'orm_default' => [ |
28 | 30 | 'entity_listener_resolver' => EntityListenerResolver::class, |
| 31 | + 'result_cache' => 'filesystem', |
| 32 | + 'metadata_cache' => 'filesystem', |
| 33 | + 'query_cache' => 'filesystem', |
| 34 | + 'hydration_cache' => 'array', |
| 35 | + 'second_level_cache' => [ |
| 36 | + 'enabled' => true, |
| 37 | + 'default_lifetime' => 3600, |
| 38 | + 'default_lock_lifetime' => 60, |
| 39 | + 'file_lock_region_directory' => '', |
| 40 | + 'regions' => [], |
| 41 | + ], |
29 | 42 | ], |
30 | 43 | ], |
31 | 44 | 'connection' => [ |
|
49 | 62 | UuidBinaryType::NAME => UuidBinaryType::class, |
50 | 63 | UuidBinaryOrderedTimeType::NAME => UuidBinaryOrderedTimeType::class, |
51 | 64 | ], |
| 65 | + 'cache' => [ |
| 66 | + 'array' => [ |
| 67 | + 'class' => ArrayAdapter::class, |
| 68 | + ], |
| 69 | + 'filesystem' => [ |
| 70 | + 'class' => FilesystemAdapter::class, |
| 71 | + 'directory' => getcwd() . '/data/cache', |
| 72 | + 'namespace' => 'doctrine', |
| 73 | + ], |
| 74 | + ], |
52 | 75 | 'fixtures' => getcwd() . '/data/doctrine/fixtures', |
53 | 76 | ], |
54 | 77 | 'resultCacheLifetime' => 300, |
|
0 commit comments