Fix layout cache not being refreshed when info.xml is edited

This commit is contained in:
Kijin Sung 2021-01-12 10:44:19 +09:00
parent 7e0e6bc25f
commit b837e3e69e
3 changed files with 5 additions and 4 deletions

View file

@ -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;
}