Skip to content

Commit

Permalink
Upgrader to add default jCache:requests
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Jan 30, 2025
1 parent f1f6884 commit 498c2d0
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lizmap/modules/lizmap/install/upgrade_requestscache.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

class lizmapModuleUpgrader_requestscache extends jInstallerModule
{
public $targetVersions = array(
'3.9.0-pre',
);
public $date = '2025-01-29';

public function install()
{
if ($this->firstExec('cacherequests')) {
$profiles = new \Jelix\IniFile\IniModifier(jApp::varConfigPath('profiles.ini.php'));
if (!$profiles->isSection('jcache:requests')) {
$profiles->setValues(array(
'enabled' => 1,
'driver' => 'file',
'ttl' => 0,
), 'jcache:requests');
$profiles->save();
}
}
}
}

0 comments on commit 498c2d0

Please sign in to comment.