Skip to content

Commit

Permalink
🐛 default cache not working
Browse files Browse the repository at this point in the history
  • Loading branch information
bnomei committed Mar 25, 2024
1 parent 25fcdc0 commit 8a1e58b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions classes/Blueprints/Blueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Blueprint

public function __construct(private readonly string $modelClass, private ?bool $defer = null, private ?int $cache = null)
{
$isCacheable = false;
$isCacheable = null;
$rc = new ReflectionClass($modelClass);
foreach ($rc->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
foreach ($method->getAttributes() as $attribute) {
Expand Down Expand Up @@ -56,7 +56,7 @@ public function blueprintCacheKeyFromModel(): string
public function toArray(): array
{
$key = $this->blueprintCacheKeyFromModel();
$blueprint = $this->cache ? BlueprintCache::get($key, null, $this->cache) : null;
$blueprint = BlueprintCache::get($key, null, $this->cache);
if ($blueprint) {
return [$key => $blueprint];
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bnomei/kirby-blueprints",
"type": "kirby-plugin",
"version": "4.4.2",
"version": "4.4.3",
"license": "MIT",
"homepage": "https://github.com/bnomei/kirby3-blueprints",
"description": "PHP Class-based Blueprints for Kirby CMS for better type safety and code completion",
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php return array(
'root' => array(
'name' => 'bnomei/kirby-blueprints',
'pretty_version' => '4.4.2',
'version' => '4.4.2.0',
'pretty_version' => '4.4.3',
'version' => '4.4.3.0',
'reference' => null,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
Expand All @@ -11,8 +11,8 @@
),
'versions' => array(
'bnomei/kirby-blueprints' => array(
'pretty_version' => '4.4.2',
'version' => '4.4.2.0',
'pretty_version' => '4.4.3',
'version' => '4.4.3.0',
'reference' => null,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
Expand Down

0 comments on commit 8a1e58b

Please sign in to comment.