The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
exclude groups from no-cache http headers ?
there is a vb option which causes me a lot of problems
Add No-Cache HTTP Headers (default No) the above option saves a lot of queries but also cause problems to users who constantly have to refresh pages manually can't we have something in between and excludes groups like unregistered from these No-Cache headers? |
#2
|
||||
|
||||
I've not got any time to do any testing, but couldn't you just turn the no-cache option on and off per usergroup in a plugin?
So to disable for guests:- hook location - global start Code:
if ($vbulletin->userinfo['userid'] == 0) { $vbulletin->options['nocacheheaders'] = 0; } |
#3
|
|||
|
|||
Quote:
How can I test if it works though? And is there a way to expand to multiple usergroups (to disable nocache for low activity groups as well), I know the syntax in templates, but plugins appear to use a different syntax. |
#4
|
||||
|
||||
Just examine the headers sent by the page.
I always need to lookup the plugin syntax, after a quick search it looks like this is what you need for multiple groups. Code:
if (is_member_of($vbulletin->userinfo, x,y)) |
#5
|
|||
|
|||
Sorry if this sounds stupid but I don't know anything about that, what should I look for that would prove the page is cached or not cached.
Thank, I will give it a try as soon as I know how to verify if it works. |
#6
|
||||
|
||||
Most browsers have developer tools in their menu's, open the developer tools and check the element headers on the network tab (there is loads of info on google on how to do it)
I've had a quick look this morning and the code from my first post does seem to work, the pragma header switches between no-cache and private the same as it does when changing the global no-cache setting. |
Благодарность от: | ||
X-or |
#7
|
|||
|
|||
Thanks z3r0, so far it seems to work wonders.
I highly recommend this plugin to anyone who had to enable no-cache headers. This will keep cache enabled for inactive users without disturbing active members. A must have. |
Благодарность от: | ||
z3r0 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|