For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > August 2004 > Preventing caching of plugins' output









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Preventing caching of plugins' output
Tommy Ipsen

2004-08-28, 8:57 pm

Hi group

I'm having some problems with caching of plugin-output!

I've normally used the third parameter of register_function() to control
cacheability of plugins but now I've rewritten the plugins and places
them in the plugin directory where they are automatically loaded when
necessary.

One of the plugins are used for providing localized dates and times for
the templates - this is used for "todays date", "last modified", "this
year" and so on - not all of these dates are allowed to be cached and I
wonder if there is any way I can control it?

Examples of the use of my plugin:

{DateLocalized format="Y"}
{DateLocalized time=$page.timestamp}
{DateLocalized}

The function uses three optional parameters (format, time, lang) and I
was wondering whether I should pass some kind of fourth parameter
stating whether or not the result is cacheable? Or maybe the function
call should be wrapped in some kind of "non-caching-tags"?

I hope you can help me out here - I've noticed quite a speed-up using
caching and I would hate to "throw it away" because of this "detail".

Regards, Tommy Ipsen
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com