Skip to content

Commit

Permalink
🐛 modified for site by contentfile not method since that would be ALL…
Browse files Browse the repository at this point in the history
… content files

Signed-off-by: Bruno Meilick <[email protected]>
  • Loading branch information
bnomei committed Apr 15, 2020
1 parent 6d97f08 commit 8cdee28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion classes/Lapse.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,12 @@ public function keyFromObject($key): string
// @codeCoverageIgnoreEnd
} else {
// ... or check file on disk now
$modified = $key->modified();
if($key instanceof \Kirby\Cms\Site) {
// site->modified() would be ALL content files
$modified = filemtime(site()->contentFile());
} else {
$modified = $key->modified();
}
}
return $key->id() . $modified;
}
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/kirby3-lapse",
"type": "kirby-plugin",
"version": "2.1.0",
"version": "2.1.1",
"description": "Cache any data until set expiration time",
"license": "MIT",
"authors": [
Expand Down

0 comments on commit 8cdee28

Please sign in to comment.