mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-28 11:04:08 +01:00
Prevent cacheKey is not set.
This commit is contained in:
@@ -45,7 +45,8 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"phpcq/all-tasks": "^1.2",
|
||||
"contao/manager-plugin": "^2.1"
|
||||
"contao/manager-plugin": "^2.1",
|
||||
"phpstan/phpstan": "^0.10.3"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
@@ -206,7 +206,10 @@ class MapProvider
|
||||
$model = $this->getModel($mapId);
|
||||
}
|
||||
|
||||
if ($model->cache) {
|
||||
$cacheKey = null;
|
||||
$doCache = $model->cache;
|
||||
|
||||
if ($doCache) {
|
||||
$cacheKey = $this->getCacheKey($mapId, $filter, $elementId, $template, $style);
|
||||
|
||||
if ($this->cache->contains($cacheKey)) {
|
||||
@@ -219,7 +222,7 @@ class MapProvider
|
||||
|
||||
$buffer = $this->doGenerate($model, $filter, $elementId, $template, $style);
|
||||
|
||||
if ($model->cache) {
|
||||
if ($doCache) {
|
||||
$this->cache->save(
|
||||
$cacheKey,
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user