@@ -29,23 +29,22 @@ public function loadConfiguration(): void
29
29
if (!FileSystem::isAbsolute ($ this ->tempDir )) {
30
30
throw new Nette \InvalidArgumentException ("Cache directory must be absolute, ' $ this ->tempDir ' given. " );
31
31
}
32
- $ dir = $ this ->tempDir . '/cache ' ;
33
- FileSystem::createDir ($ dir );
34
- if (!is_writable ($ dir )) {
35
- throw new Nette \InvalidStateException ("Make directory ' $ dir' writable. " );
32
+ FileSystem::createDir ($ this ->tempDir );
33
+ if (!is_writable ($ this ->tempDir )) {
34
+ throw new Nette \InvalidStateException ("Make directory ' $ this ->tempDir ' writable. " );
36
35
}
37
36
38
37
$ builder = $ this ->getContainerBuilder ();
39
38
40
39
if (extension_loaded ('pdo_sqlite ' )) {
41
40
$ builder ->addDefinition ($ this ->prefix ('journal ' ))
42
41
->setType (Nette \Caching \Storages \Journal::class)
43
- ->setFactory (Nette \Caching \Storages \SQLiteJournal::class, [$ dir . '/journal.s3db ' ]);
42
+ ->setFactory (Nette \Caching \Storages \SQLiteJournal::class, [$ this -> tempDir . '/journal.s3db ' ]);
44
43
}
45
44
46
45
$ builder ->addDefinition ($ this ->prefix ('storage ' ))
47
46
->setType (Nette \Caching \Storage::class)
48
- ->setFactory (Nette \Caching \Storages \FileStorage::class, [$ dir ]);
47
+ ->setFactory (Nette \Caching \Storages \FileStorage::class, [$ this -> tempDir ]);
49
48
50
49
if ($ this ->name === 'cache ' ) {
51
50
if (extension_loaded ('pdo_sqlite ' )) {
0 commit comments