mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix layout cache not being refreshed when info.xml is edited
This commit is contained in:
parent
7e0e6bc25f
commit
b837e3e69e
3 changed files with 5 additions and 4 deletions
|
|
@ -62,7 +62,7 @@ class layoutAdminModel extends layout
|
|||
|
||||
// Get layout information
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($layout_srl);
|
||||
$layout_info = $oLayoutModel->getLayout($layout_srl, false);
|
||||
|
||||
// Error appears if there is no layout information is registered
|
||||
if(!$layout_info)
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ class layoutAdminView extends layout
|
|||
$layout_srl = Context::get('layout_srl');
|
||||
// Get layout information
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($layout_srl);
|
||||
$layout_info = $oLayoutModel->getLayout($layout_srl, false);
|
||||
// Error appears if there is no layout information is registered
|
||||
if(!$layout_info) return $this->dispLayoutAdminInstalledList();
|
||||
|
||||
|
|
|
|||
|
|
@ -265,13 +265,14 @@ class layoutModel extends layout
|
|||
* Get one of layout information created in the DB
|
||||
* Return DB info + XML info of the generated layout
|
||||
* @param int $layout_srl
|
||||
* @param bool $use_cache
|
||||
* @return object info of layout
|
||||
*/
|
||||
function getLayout($layout_srl)
|
||||
function getLayout($layout_srl, $use_cache = true)
|
||||
{
|
||||
// Get information from cache
|
||||
$layout_info = Rhymix\Framework\Cache::get("layout:$layout_srl");
|
||||
if ($layout_info !== null)
|
||||
if ($use_cache && $layout_info !== null)
|
||||
{
|
||||
return $layout_info;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue