Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
"license": "AGPL-3.0-or-later",
"minimum-stability": "dev",
"prefer-stable": false,
"repositories": [
{
"type": "vcs",
"url": "https://github.com/doctrine/DoctrineBundle"
}
],
"require": {
"php": ">=8.3",
"ext-ctype": "*",
Expand Down
72 changes: 31 additions & 41 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions config/packages/cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ framework:
default_redis_provider: "%app.redis_uri%"

pools:
app.dbrunner:
adapter: cache.adapter.apcu
default_lifetime: "1 hour"
cache.dbrunner:
adapter: cache.adapter.redis_tag_aware
default_lifetime: "12 hour"
# Unique name of your app: used to compute stable namespaces for cache keys.
#prefix_seed: your_vendor_name/app_name

Expand Down
3 changes: 3 additions & 0 deletions frankenphp/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
fi
fi

echo "Cleaning up dbrunner cache..."
php bin/console cache:pool:clear cache.dbrunner || true

setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var
fi
Expand Down
4 changes: 2 additions & 2 deletions src/Service/DbRunnerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{
protected DbRunner $dbRunner;

public function __construct(protected CacheInterface $appDbrunnerCache)
public function __construct(protected CacheInterface $cacheDbrunner)
{
$this->dbRunner = new DbRunner();
}
Expand All @@ -33,6 +33,6 @@ public function runQuery(string $schema, string $query): array
$queryHash = $this->dbRunner->hashStatement($query);
$hash = "dbrunner.$schemaHash.$queryHash";

return $this->appDbrunnerCache->get($hash, fn () => $this->dbRunner->runQuery($schema, $query));
return $this->cacheDbrunner->get($hash, fn () => $this->dbRunner->runQuery($schema, $query));
}
}