File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,15 @@ guarantees an optimized loading procedure.
16
16
> ` ` ` bash
17
17
> $ composer require laminas/laminas-cache-storage-deprecated-factory
18
18
> ` ` `
19
+ >
20
+ > laminas-cache is shipped without a specific cache adapter to allow free choice of storage backends and their dependencies.
21
+ > So make sure that the required adapters are installed.
22
+ >
23
+ > The following example used the [memory adapter of laminas-cache](https://docs.laminas.dev/laminas-cache/storage/adapter/# memory-adapter):
24
+ >
25
+ > ` ` ` bash
26
+ > $ composer require laminas/laminas-cache-storage-adapter-memory
27
+ > ` ` `
19
28
20
29
# # Enable Caching
21
30
@@ -26,10 +35,7 @@ method.
26
35
$translator = new Laminas\I 18n\T ranslator\T ranslator();
27
36
$cache = Laminas\C ache\S torageFactory::factory([
28
37
' adapter' => [
29
- ' name' => Laminas\C ache\S torage\A dapter\F ilesystem::class,
30
- ' options' => [
31
- ' cache_dir' => __DIR__ . ' /cache' ,
32
- ],
38
+ ' name' => Laminas\C ache\S torage\A dapter\M emory::class,
33
39
],
34
40
]);
35
41
$translator -> setCache($cache );
You can’t perform that action at this time.
0 commit comments