Skip to content

Commit

Permalink
Merge pull request #5086 from 3liz/backport-5081-to-release_3_8
Browse files Browse the repository at this point in the history
[Backport release_3_8] Speed up main view with project main data
  • Loading branch information
rldhont authored Dec 5, 2024
2 parents 41ccdb3 + cc63263 commit 0751b0c
Show file tree
Hide file tree
Showing 9 changed files with 709 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function getData($form)
if ($criteria && array_key_exists($criteria, $this->data)) {
$rep = lizmap::getRepository($criteria);
// Get projects metadata
$metadata = $rep->getProjectsMetadata();
$metadata = $rep->getProjectsMainData();
foreach ($metadata as $meta) {
if ($meta->getHidden()) {
continue;
Expand Down
5 changes: 5 additions & 0 deletions lizmap/modules/lizmap/classes/lizmapRepository.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ public function getProjectsMetadata()
return $this->repo->getProjectsMetadata();
}

public function getProjectsMainData()
{
return $this->repo->getProjectsMainData();
}

/**
* Return the value of the Access-Control-Allow-Origin HTTP header.
*
Expand Down
1 change: 1 addition & 0 deletions lizmap/modules/lizmap/lib/Project/ProjectCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public function retrieveProjectData()
try {
$data = $this->appContext->getCache($this->fileKey, $this->profile);
if ($data === false
|| is_null($data)
|| $data['qgsmtime'] < $this->qgsMtime
|| $data['qgscfgmtime'] < $this->qgsCfgMtime
|| !isset($data['format_version'])
Expand Down
Loading

0 comments on commit 0751b0c

Please sign in to comment.