Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
  #1  
Old 12-15-2011, 01:26 PM
Swedie's Avatar
Swedie Swedie is offline
 
Join Date: Feb 2002
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Including global.php on other pages, caching issue!

Hey! I've recently upgraded to vB4, everything works sorta OK, except for the caching of the main page on the site (and probably other pages).

The first page has a list of latest threads. I can go to one of these threads and post a message, and browse back to the start page and my post won't show up, not until I have refreshed the page again.

Site: www.sporthoj.com
Forum: www.sporthoj.com/forum

The code basics:
There's a header and a footer file. The header includes the vB global.php file so I gain access to the super object $vbulletin and know whether a user is logged in and so forth.

The forum includes my header and footer (through plugin, bootstrap_init) to wrap the forum with the site theme.

Outside of the forum I use standard php for doing mysql queries, meaning: mysql_query() commands. I am not going through vB's object $vb->db...

I've turned off caching completely in the vB settings. This had no effect.

Are there other things in vB4 that can cause PHP to do (for me) unwanted caching of the PHP pages?
Reply With Quote
  #2  
Old 12-15-2011, 03:13 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Swedie View Post
The first page has a list of latest threads. I can go to one of these threads and post a message, and browse back to the start page and my post won't show up, not until I have refreshed the page again.
I find that happens and I'm pretty sure it's the browser. If I use the back button it shows an "old" copy of the previous page until I refresh. If the code that generates the list of threads on your main page goes straight to the db then I don't know where else it would be cached.
Reply With Quote
  #3  
Old 12-16-2011, 08:33 AM
Swedie's Avatar
Swedie Swedie is offline
 
Join Date: Feb 2002
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried to explain what you quoted so it would not be intepreted wrong. I am posting my message, then I can go continue browsing to other pages, and eventuelly click "back to startpage" and the startpage would not be updated until I actively click refresh again, or hit F5 on the keyboard.

Thing is, almost all complain about this. I've also had my reasons to blame the webbrowser, but should then ALL browsers behave the same?
Reply With Quote
  #4  
Old 12-16-2011, 11:52 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I thought you might have said "browsed back" specifically to mean that you didn't hit the back button, but I thought I'd mention it anyway. But if you use a tool that shows you what requests are being made you should be able to tell if it's being cached by the browser or not. Firefox with FireBug will show you (although it does a lot of things so it's a bit complicated). I also have used a FireFox addon called Tamper Data which does less so it might be easier to use for your purpose.

I've also heard of web servers that cache, so if you have some server settings you have access to, maybe check to see if there's anything about caching.
Reply With Quote
  #5  
Old 12-19-2011, 07:08 PM
Swedie's Avatar
Swedie Swedie is offline
 
Join Date: Feb 2002
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But it changed after I upgraded to vB4... it must then be some type of cache that vB4 makes use of, that vB3 didn't.

Anyone that can take a guess?
Reply With Quote
  #6  
Old 12-20-2011, 08:17 PM
Swedie's Avatar
Swedie Swedie is offline
 
Join Date: Feb 2002
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Noone wants to take a guess? I've tried laborating with php's own cache control also adding no-cache headers in the headers with html. No difference...

--------------- Added [DATE]1324416053[/DATE] at [TIME]1324416053[/TIME] ---------------

Some more info.

If I logout and the redirect goes outside of the forum, for example my startpage at root (/). The headers stays as if I am still logged in.

But if I logout, and is returned back to somewhere inside the forum bounds, the headers are not cached and I am really logged out.

Remember, I am including the global.php file, and I am also making use of the global $header variable. This variable seem to be cached and not re-generated when outside of the forum.

I hope someone here knows how to deal with this.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:34 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07541 seconds
  • Memory Usage 2,206KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete