Skip to content

Commit 6768485

Browse files
SamuellSamuell
authored andcommitted
Merge branch 'develop'
2 parents 5a8a2d9 + 4603b52 commit 6768485

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

components/ContentEditor.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php namespace Samuell\ContentEditor\Components;
22

3+
use Cache;
34
use File;
45
use BackendAuth;
56
use Cms\Classes\Content;
@@ -88,7 +89,9 @@ public function onRender()
8889
if ($this->checkEditor()) {
8990
$this->content = $content;
9091
} else {
91-
return $this->renderPartial('@render.htm', ['content' => $content]);
92+
return Cache::remember('contenteditor::content-' . $this->file, now()->addHours(24), function () use ($content) {
93+
return $this->renderPartial('@render.htm', ['content' => $content]);
94+
});
9295
}
9396
}
9497

updates/version.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@
3434
1.2.4:
3535
- Allow style attribute in property dialog
3636
- Add support for image cropping
37-
- Added permissions for backend settings page
37+
- Added permissions for backend settings page
38+
1.2.5:
39+
- Add component caching

0 commit comments

Comments
 (0)