2014-11-08, 04:21 PM
Recently i been getting more into mybb dev and i'm learning and reading by what other plugins do. I found a plugin that was a add spider plugin not the typical ones this one just inserted queries using an array and is nothing but queries.
I have seen others say in other threads with other issues one being this: http://community.mybb.com/thread-156406-...pid1087748 that the cache should be updated my question is if we code plugins that simply insert queries, should we also be updating the cache to?
What's actually better and how can i tell if it's really working to as far as cache updating?
Current:
Old:
As for cache updating if it is the best practice so to say, then how come more authors simply do not do it?
< Confused.
I have seen others say in other threads with other issues one being this: http://community.mybb.com/thread-156406-...pid1087748 that the cache should be updated my question is if we code plugins that simply insert queries, should we also be updating the cache to?
What's actually better and how can i tell if it's really working to as far as cache updating?
Current:
global $db, $cache, $mybb;
$db->insert_query('banfilters', array('filter' => "*@0-mail.com", 'lastuse' => "0", 'type' => "3", 'dateline' => TIME_NOW));
$cache->update_bannedemails();
Old:
global $db;
$db->insert_query('banfilters', array('filter' => "*@0-mail.com", 'lastuse' => "0", 'type' => "3", 'dateline' => TIME_NOW));
As for cache updating if it is the best practice so to say, then how come more authors simply do not do it?
< Confused.