-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
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
Smarty creates cache for includes with cache_id even when it's null and cache disabled #1061
Comments
Hello,
Example: |
But I need to cache it when cache is enabled or cache_id is not null. |
Then you should use a statement behaviour |
I thought about it, but it's too verbose. The main problem is with |
It would be better if you provide the proper code snippet that addresses your issue, so I can help you more effectively. We can also optimize the code by understanding its functionality once you provide it |
Works fine usually, but in .tpl Smarty still creates cache files even when function returns null and when caching is disabled in Smarty... I think this is a bug. UPD... Actually, |
Hey, Sorry for taking so long. This could be a bug. But here is a solution for you :
|
This is because assigning the cache_id seems to be set as a string and not as a null type |
Could you please let me know if it works or not? |
Huh, turns out, it's not that simple... Tried printing |
Verbose syntax it is, I guess... |
Mmm🤔 |
Well, |
Have you tried passing the value for |
I created a structure identical to the code snippet he provided, keeping |
|
No, |
But then cache_id will be |
Then we should try adding another statement to check whether the cache is disabled by default in the initialization or not, and proceed accordingly. |
I have Smarty cache globally disabled,
cache_lifetime
set to 0, butinclude
with anycache_id
still creates cache files.{include file='example.tpl' cache_id=NULL}
Any way to disable this behavior?
v5.4.1
The text was updated successfully, but these errors were encountered: