Help: Smarty Caching
Posted: Mon Jun 10, 2013 11:59 pm
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
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