Skip to content

Commit 5f1cbaf

Browse files
committed
WIP Use FileSystem adapter for cache
1 parent 5aa961b commit 5f1cbaf

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

services.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ services:
118118
tags: [ 'kernel.event_subscriber' ]
119119

120120
oxidesales.graphqlbase.cacheadapter:
121-
class: Symfony\Component\Cache\Adapter\NullAdapter
121+
class: Symfony\Component\Cache\Adapter\FilesystemAdapter
122+
arguments:
123+
$directory: '@=service("OxidEsales\\EshopCommunity\\Internal\\Transition\\Utility\\ContextInterface").getCacheDirectory() ~ "/oe_graphql_base-graphqlite/" ~ service("OxidEsales\\EshopCommunity\\Internal\\Transition\\Utility\\ContextInterface").getCurrentShopId()'
122124

123125
oxidesales.graphqlbase.cache:
124126
class: Symfony\Component\Cache\Psr16Cache

src/Event/Subscriber/ModuleChangeSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(private readonly CacheInterface $cache)
3030
public function handle(Event $event): Event
3131
{
3232
//clear entire cache
33-
$this->cache->clear();
33+
// $this->cache->clear();
3434

3535
return $event;
3636
}

src/Framework/SchemaFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ public function getSchema(): Schema
8181
$factory->setAuthenticationService($this->authentication)
8282
->setAuthorizationService($this->authorization);
8383

84+
$factory->prodMode();
85+
8486
$this->schema = $factory->createSchema();
8587
$queryTimer->stop();
8688

0 commit comments

Comments
 (0)