e107sk.com

Content Category e107 Cache

e107 Cache (3 items)

Thursday 14 May 2020

e107 Cache

Core caching on 14 May 2020

 Just some

online_menu_totals
wmessage
news
'newsarchive' _caption,_title,_diz,_rows
"nq_othernews"
news_php_extend_'.$id.'_'
'nq_news_latest_menu_'.md5(serialize($parm).USERCLASS_LIST.e_LANGUAGE);
'nq_news_categories_menu_'.md5(serialize($parm).USERCLASS_LIST.e_LANGUAGE);
'nq_news_months_menu_'.md5(serialize($parm).USERCLASS_LIST.e_LANGUAGE);
'news.php_default_'
'news.php_'.e_QUERY
comment.php?{$table}.{$id}
nq_chatbox
nomd5_linkwords
nomd5_user_ranks
'menus_'.USERCLASS_LIST.'_'.md5(e_LANGUAGE.$menu_layout_field)

Retrieve Cache on 14 May 2020

Example (from shortcode):

$e107cache = e107::getCache();

if($cacheData = $e107cache->retrieve('your_code'))
{
return $cacheData;
}

$cache_data = '';

$cache_data = $text;

$e107cache->set('your_code', $cache_data);
return $cache_data;


define('LW_CACHE_ENABLE', FALSE);

define('LW_CACHE_TAG', 'nomd5_linkwords');

if(LW_CACHE_ENABLE && ($temp = e107::getCache()->retrieve_sys(LW_CACHE_TAG))) {}

if(!vartrue($temp)) // Either cache disabled, or no info in cache (or error reading/processing cache)
{

}

Delete cache in Admin UI on 14 May 2020

Example:

public function afterUpdate($new_data, $old_data, $id)
{
e107::getCache()->clear("your_code");
}

Example:

define('LW_CACHE_TAG', 'nomd5_linkwords');
e107::getCache()->clear_sys(LW_CACHE_TAG);

public function afterCreate($new_data, $old_data, $id)
{
e107::getCache()->clear_sys(LW_CACHE_TAG);
// do something
}

public function afterUpdate($new_data, $old_data, $id)
{
e107::getCache()->clear_sys(LW_CACHE_TAG);
// do something
}


public function afterDelete($deleted_data, $id, $deleted_check)
{
e107::getCache()->clear_sys(LW_CACHE_TAG);

}

Other links

Follow us