#1829 - Allow coding up of template dependencies
0 guests and 0 members have recently viewed this.
The top 3 point earners from 14th Dec 2025 to 21st Dec 2025.
| PDStig |
|
|
|---|---|---|
| Gabri |
|
|
| sholzy |
|
|
There are no events at this time
dep:custom.less
Could be encapsulated using whatever native comments, e.g.
/*dep:custom.less*/
{$,dep:FORM_STANDARD_END.tpl}
New function, can_use_cache($cache_type, $file_path, $cache_path) -- implements smart_decaching (if enabled), and checks of various cache/keep_cache/cache_*/keep_cache_* parameters, and $SITE_INFO['dependency__' / dependencies_are_good stuff (recursively)
Rename disable_smart_decaching to smart_decaching, and don't have enabled by default (due to the performance hit)
Update the documentation about smart_decaching to make it clear it is not on by default, although it can be enabled via the keep_smart_decaching option
New keep_cache_off_for parameter. Any cacheable asset matching that regexp will not be cached. Implemented within can_use_cache function. Documented alongside documentation about smart_decaching
New automatic dependency detection support:
When Tempcode is parsed with the INCLUDE directive, update a .dat file, e.g. global.css.tcp.dat
Emptying the template cache (in any way) should delete the .dat files
can_use_cache function will use this data, recursively
Document alongside documentation about smart_decaching
All we need is a simple keep_cache_avoid_for URL parameter that takes a regexp of what templates (etc) to temporarily not enable caching on.
Then the developer can debug using that, and when done, empty the template cache.
Meanwhile, the ability to hard-code dependencies is useful, so I've simply documented the simple implementation I've already done.
Implementing auto-detection for that would just be bloat, too much core complexity.