vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Reset forum query caching (https://vborg.vbsupport.ru/showthread.php?t=190059)

asandhanam 09-04-2008 11:12 PM

Reset forum query caching
 
Hi i'm trying to update the 'forum' table fields from a cfm application. But though the db shows the updated values, i don't see the changes live until i update something via the forum admin which seems like changes via admin resets the cached query while direct updating from another app doesn't do that. Can someone tell me how to reset the caching while trying to run update queries on the 'forum' table from another application?

Marco van Herwaarden 09-05-2008 06:36 AM

Easiest would be to use the vB DataManagers instead of manual editing the database. See our Articles section on how to use the DataManagers.

asandhanam 09-05-2008 02:58 PM

Thank you for the reply. The application from which i'm trying to update the forum table is written in coldfusion. So from within this application i have to be able to update the forum data & also update the forum data cache. Is this possible ?

asandhanam 09-21-2008 04:36 PM

I gathered snippets of code from previous posts and came up with this to update the forum table & reset cache. Trying to make this an include from my external app. I'm passing the forumid & the field to be updated.

<?
error_reporting(E_ALL & ~E_NOTICE);
include ('./global.php');
include (DIR . '/includes/adminfunctions_template.php');
include (DIR . '/includes/adminfunctions_forums.php');

$forum_num = $vbulletin->input->clean_gpc('g', 'f', TYPE_NOTRIM);
$sponsored = $vbulletin->input->clean_gpc('g', 's', TYPE_NOTRIM);

$forumdm =& datamanager_init('Forum', $vbulletin, ERRTYPE_STANDARD, 'forum');

$foruminfo = fetch_foruminfo($forum_num);

$forumdm->set_existing($foruminfo);
$forumdm->set('sponsored', $sponsored);

if ($forumdm->save())
echo "saved";
else
echo "error";

?>

Not sure whats wrong. Can anyone help.

Thanks.


All times are GMT. The time now is 02:42 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02291 seconds
  • Memory Usage 1,708KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete