[FIX] Caching issues with hybrid templates
* Create subfolders for cache/compiled files for themes Fixes #1016 once merged.
This commit is contained in:
parent
bce47b72af
commit
cfe47ed787
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,7 +3,9 @@
|
|||||||
|
|
||||||
# Templates
|
# Templates
|
||||||
/public/templates/compile/*.php
|
/public/templates/compile/*.php
|
||||||
|
/public/templates/compile/**
|
||||||
/public/templates/cache/*.php
|
/public/templates/cache/*.php
|
||||||
|
/public/templates/cache/**
|
||||||
|
|
||||||
# Logs
|
# Logs
|
||||||
/cronjobs/logs/*.txt
|
/cronjobs/logs/*.txt
|
||||||
|
|||||||
@ -156,7 +156,7 @@ $smarty = new Smarty;
|
|||||||
// Assign our local paths
|
// Assign our local paths
|
||||||
$debug->append('Define Smarty Paths', 3);
|
$debug->append('Define Smarty Paths', 3);
|
||||||
$smarty->template_dir = BASEPATH . 'templates/' . THEME . '/';
|
$smarty->template_dir = BASEPATH . 'templates/' . THEME . '/';
|
||||||
$smarty->compile_dir = BASEPATH . 'templates/compile/';
|
$smarty->compile_dir = BASEPATH . 'templates/compile/' . THEME . '/';
|
||||||
$smarty->registerResource('hybrid', new Smarty_Resource_Hybrid(
|
$smarty->registerResource('hybrid', new Smarty_Resource_Hybrid(
|
||||||
new Smarty_Resource_Database($template),
|
new Smarty_Resource_Database($template),
|
||||||
new Smarty_Internal_Resource_File()
|
new Smarty_Internal_Resource_File()
|
||||||
@ -169,7 +169,7 @@ if ($config['smarty']['cache']) {
|
|||||||
$debug->append('Enable smarty cache');
|
$debug->append('Enable smarty cache');
|
||||||
$smarty->setCaching(Smarty::CACHING_LIFETIME_SAVED);
|
$smarty->setCaching(Smarty::CACHING_LIFETIME_SAVED);
|
||||||
$smarty->cache_lifetime = $config['smarty']['cache_lifetime'];
|
$smarty->cache_lifetime = $config['smarty']['cache_lifetime'];
|
||||||
$smarty->cache_dir = BASEPATH . "templates/cache";
|
$smarty->cache_dir = BASEPATH . "templates/cache/" . THEME;
|
||||||
$smarty->use_sub_dirs = true;
|
$smarty->use_sub_dirs = true;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user