We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is no way to reenable caching in a nocaching tag. See the following example:
I set a nocache bool and some hard-to-calculate numbers:
$smarty->caching = true; $smarty->assign('decision', false, true); $smarty->assign('numberA', hardAlgorithmA()); $smarty->assign('numberB', hardAlgorithmB()); $smarty->display('display.tpl');
display.tpl
{if $decision} <p>{$numberA}</p> {else} <p>{$numberB}</p> {/if}
I want to get $numberA and $numberB to be cached in resulting template, the if itself not. This is currently not possible.
I think it could be easier if there would be a {cache} around the numbers to force caching?
The text was updated successfully, but these errors were encountered:
Any ideas to solve this?
Sorry, something went wrong.
The dev-master version has already addressed this. See #110 There is a new {make_nocache} tag. Read the NEW_FEATURES.txt
{make_nocache $numberA} {make_nocache $numberB} {if $decision} <p>{$numberA}</p> {else} <p>{$numberB}</p> {/if}
Note that {make_nocache} must be called before the {if}
No branches or pull requests
There is no way to reenable caching in a nocaching tag. See the following example:
I set a nocache bool and some hard-to-calculate numbers:
display.tpl
I want to get $numberA and $numberB to be cached in resulting template, the if itself not. This is currently not possible.
I think it could be easier if there would be a {cache} around the numbers to force caching?
The text was updated successfully, but these errors were encountered: