Skip to content

Commit

Permalink
feat: #54 fix laravel-data caching
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdan-shulha committed Jul 4, 2024
1 parent 0c48000 commit 0b8edc1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
1 change: 0 additions & 1 deletion app/Models/DeploymentData/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ public function asNodeTasks(Deployment $deployment): array
'ContainerSpec' => [
'Image' => $this->dockerImage,
'Labels' => $labels,
// 'Command' => ['sh -c "' . Str::replace('"', '\\"', $worker->command) . '"'],
'Command' => ['sh', '-c'],
'Args' => [
$worker->command,
Expand Down
31 changes: 31 additions & 0 deletions config/data.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

use Illuminate\Support\Enumerable;

return [
/**
* It is possible to skip the PHP reflection analysis of data objects
* when running in production. This will speed up the package. You
* can configure where data objects are stored and which cache
* store should be used.
*
* Structures are cached forever as they'll become stale when your
* application is deployed with changes. You can set a duration
* in seconds if you want the cache to clear after a certain
* timeframe.
*/
'structure_caching' => [
'enabled' => true,
'directories' => [app_path('')],
'cache' => [
'store' => 'file',
'prefix' => 'laravel-data',
'duration' => null,
],
'reflection_discovery' => [
'enabled' => true,
'base_path' => base_path(),
'root_namespace' => null,
],
],
];

0 comments on commit 0b8edc1

Please sign in to comment.