Help - Search - Members - Calendar
Full Version: OOO! Got a good idea!
Invision Power Services > Community Forums > Community General Chat
Luke
For those of you that are aware of my moderator center, atleast the new version, it requires that it's cache is part of the global cache's. In index.php there is a line which lists and combines cache names to load. To include my cache as a global cache, its name has to be included... Or so I thought.

Here's the idea: Add a column to the cache_store table called "cs_global". If a cache has this set to "1" then it means it must be loaded as a global cache, and if set to "0" it means it will be loaded when the module loaded (as normal). So then when IPB loads the global cache's you can have it load all the cache's with that value set to 1, rather than by the specific names.

So like (where the extra1 and extra2 represent cache's loaded when a specific module is loaded):

SQL
Select cs_value FROM ibf_cache_store WHERE cs_global=1 OR cs_key IN (extra1, extra2)


So if IPB loads it's global cache's this way, then all you would have to do for your custom module is set cs_global to 1 on your custom cache, if you need it loaded as a global cache biggrin.gif
Chris Griego
I rather like this idea, more inviting to abuse than requiring a modification to the source files, but customers are less likely to screw up a file if several mods need to add global caches, which would mean edits to the same line.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.