Help: Smarty Caching

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
bbonora
Forum Members
Forum Members
Posts: 48
Joined: Mon Nov 06, 2006 6:10 am

Help: Smarty Caching

Post by bbonora »

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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Help: Smarty Caching

Post by calguy1000 »

{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.
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.
bbonora
Forum Members
Forum Members
Posts: 48
Joined: Mon Nov 06, 2006 6:10 am

Re: Help: Smarty Caching

Post by bbonora »

Where is the file located that's actually writing to the tmp directory? Would you recommend using smarty for the application I've described?
Post Reply

Return to “Developers Discussion”