Merge pull request #1264 from TheSerapher/issue-1016
[FIX] Caching issues with hybrid templates
This commit is contained in:
commit
fe31737576
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,7 +3,9 @@
|
||||
|
||||
# Templates
|
||||
/public/templates/compile/*.php
|
||||
/public/templates/compile/**
|
||||
/public/templates/cache/*.php
|
||||
/public/templates/cache/**
|
||||
|
||||
# Logs
|
||||
/cronjobs/logs/*.txt
|
||||
|
||||
@ -156,7 +156,7 @@ $smarty = new Smarty;
|
||||
// Assign our local paths
|
||||
$debug->append('Define Smarty Paths', 3);
|
||||
$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(
|
||||
new Smarty_Resource_Database($template),
|
||||
new Smarty_Internal_Resource_File()
|
||||
@ -169,7 +169,7 @@ if ($config['smarty']['cache']) {
|
||||
$debug->append('Enable smarty cache');
|
||||
$smarty->setCaching(Smarty::CACHING_LIFETIME_SAVED);
|
||||
$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;
|
||||
}
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user