The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How to check if a post is cached or not?
Does anyone know by a chance how to check if a given post is cached or not?
I'm working on something and that knowledge would be helpful. I could not find the answer on my own. |
#2
|
||||
|
||||
It's usually not per post, but per template. Enabling debug mode will let you see which templates are not being cached. https://vborg.vbsupport.ru/showthread.php?t=82835
|
#3
|
|||
|
|||
There is a table called postparsed that caches the html for a post. It's done separately for each style and language, so you would really need to check postid, styleid, and languageid to see if a given postid is cached for the current value of STYLEID and LANGUAGEID. So maybe something like:
Code:
$cached = $vbulletin->db->query_first(" SELECT * FROM " . TABLE_PREFIX . "postparsed WHERE postid = $postid AND styleid = " . intval(STYLEID) . " AND languageid = " . intval(LANGUAGEID) . " "); if ($cached) { /// post is cached } |
#4
|
||||
|
||||
Thank you Kevin!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|