I'm interested in creating a module that allows users to create JavaScript to use within themes. I was thinking it would work similar to the Layout -> StyleSheet functionality. I understand how to store the data within the database but what I'm struggling with is how to utilize smarty and it's caching capabilities. Ideally I would like it to function like the combined StyleSheets does.
I've noticed that when a page is accessed a temporary file is written for the stylesheet in the /tmp/cache/ directory, it usually looks something like this: "stylesheet_combined_####.css". In addition a file called *.dat is written and then deleted. I want to know more about what is going on when this occurs.
I was hoping somebody could show me a simple example of what smarty functions are being called when the caching occurs. I realize this is a complex topic but if somebody could explain the theory as well as a simple code example I would greatly appreciate it.
Thanks,
Ben
Help: Smarty Caching
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Help: Smarty Caching
{cms_stylesheet} doesn't use Smarty Caching.
It simply gathers all the appropriate stylesheets (according to criteria)... passes them through smarty, and outputs the file to a generated name in tmp/cache.
It simply gathers all the appropriate stylesheets (according to criteria)... passes them through smarty, and outputs the file to a generated name in tmp/cache.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Help: Smarty Caching
Where is the file located that's actually writing to the tmp directory? Would you recommend using smarty for the application I've described?