Skip to content

Commit 1209aca

Browse files
committed
🐛 default 60 sec for cache did not work
Signed-off-by: bnomei <[email protected]>
1 parent e973caa commit 1209aca

File tree

6 files changed

+177
-176
lines changed

6 files changed

+177
-176
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,15 +555,16 @@ If caching is enabled it will only compile the blueprint once and then use the c
555555

556556
```php
557557
#[
558-
// cache for 5 seconds
559-
Blueprint(cache: 5)
558+
// cache for 120 seconds
559+
Blueprint(cache: 120)
560560

561561
// cache with default 60 seconds
562562
Blueprint()
563563
Blueprint(cache: null)
564564

565565
// disable
566566
Blueprint(cache: 0)
567+
Blueprint(cache: false)
567568
]
568569
```
569570

classes/Blueprints/BlueprintCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static function exists(string $key, ?int $expire = null): bool
5656
return false;
5757
}
5858
if ($expire === null) {
59-
$expire = option('bnomei.blueprints.expire'); // in seconds
59+
$expire = 60; // in seconds, option()-helper not available yet
6060
}
6161
if (! $expire || $expire <= 0) {
6262
return false;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bnomei/kirby-blueprints",
33
"type": "kirby-plugin",
4-
"version": "4.4.6",
4+
"version": "4.4.7",
55
"license": "MIT",
66
"homepage": "https://github.com/bnomei/kirby3-blueprints",
77
"description": "PHP Class-based Blueprints for Kirby CMS for better type safety and code completion",

0 commit comments

Comments
 (0)