Cache
General
Caching can be setted for:
- superglobals settings
- themes settings
- sub-templates (partial HTML caching)
- templates (total HTML caching)
All of four caching systems can be activated in parallel in ../config/front_end/config_sys_frt.php
adding the value 1
to the following constants:
// superglobals cache
define("CACHE_SUPERGLOBALS_FRT", 1);
// themes cache
define("CACHE_THEMES_FRT", 1);
// tags cache
define("CACHE_TAGS_FRT", 1);
// pages cache
define("CACHE_PAGES_FRT", 1);
Caching process can be stopped adding the value 0
to previous constants.
However, if templates caching is activated at the same time as sub-templates caching, the latter will be overridden by the first one.
To be updated, each caching system has to be activated adding the value 1
to the following constants:
// updates superglobals cache settings
define("UPDATE_CACHE_SUPERGLOBALS_SETTINGS_FRT", 1);
// updates themes cache settings
define("UPDATE_CACHE_THEMES_SETTINGS_FRT", 1);
// updates tags cache
define("UPDATE_CACHE_TAGS_OUTPUTS_FRT", 1);
// updates pages cache
define("UPDATE_CACHE_PAGE_OUTPUTS_FRT", 1);
Cache files will be generated as soon as an user will refresh the involved page on its browser.
Updating process can be stopped adding the value 0
to previous constants.
Superglobals caching
Superglobals caching file is located in ../core/front_end/cache/settings/cache_superglobals_frt.php
and is automatically generated:
#example
$cache_superglobals['page_lang_frt'] = array(
'en-us');
$cache_superglobals['page_id_frt'] = array(
'1', '2');
Themes caching
Themes caching file is located in ../core/front_end/cache/settings/cache_themes_frt.php
and is automatically generated:
#example
#home pages
$cache_settings_default = array(
'en-us' => array( // theme language
'theme_default_frt', // theme folder
'home' // theme TPL
)
);
# id pages
$cache_settings_id = array(
'1' => array( // id page
'en-us', // theme language
'theme_default_frt', // theme folder
'docs' // theme TPL
)
);
Sub-templates caching
Sub-templates files are located in ../core/front_end/cache/outputs/{theme_lang}/{theme_folder}/tags/{public/private}/{sub_tpl_category}/{sub_template_name_ID_PAGE/LANG_PAGE.tpl}
and are automatically generated as HTML tpl chunks.
<p>
...
</p>
<!-- Served from cache :: ' . gmdate("M d Y H:i:s") . '-->
Templates caching
Templates file are located in ../core/front_en/cache/outputs/{theme_lang}/{theme_folder}/pages/{public/private}/ID_PAGE.tpl
and are automatically generated as HTML tpl files.
<html>
...
</html>
<!-- Served from cache :: ' . gmdate("M d Y H:i:s") . '-->