Caching templates if they exists.
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Caching templates if they exists.
Just add it to the templatelist directly.  Don't worry about checking if it exists beforehand.  To do that, you'd need to query, so you're not really saving processing time performing the check (in fact, the opposite).  Loading templates is pretty fast, so just do it.

In theory, you could dynamically construct a template list in the ACP and cache it somewhere, but I don't think it's worth the effort.
XThreads just pulls all the templates across regardless of whether they exist.


Or if you can narrow things down a lot later on, just use your own $templates->cache() call, if you think it's worth it.

For regex, you'd have to manually query the database.

My Blog
05-07-2012 02:02 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Caching templates if they exists. - Sama34 - 05-07-2012, 01:50 PM
RE: Caching templates if they exists. - ZiNgA BuRgA - 05-07-2012 02:02 PM

 Standard Tools
Forum Jump: