yep, setting debug mode should tell you where the templates are being read from in the bottom dropdown...
--------------- Added [DATE]1411485646[/DATE] at [TIME]1411485646[/TIME] ---------------
Quote:
Originally Posted by kh99
I don't think that quite works as expected because calling return in a plugin doesn't return from the function that calls it, it provides a return value from the 'eval' call (which is ignored). But as you can see in the code above, there's a "fetched" variable, and if the plugin sets that to true then the database query (or cache lookup) won't be done. So I think you'd want your plugin to include only the code from inside the "if", then set $fetched to true.
Edit: I think tpearl's code would work because the code in fetch_template() gets it from the cache if it's set.
|
I was about to say the same thing.
fyi, vb optimise has a feature to do all of this and/or read templates from the cache of your choice.