vBulletin Modifications

Cache System Explanation (datastore)

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support > vBulletin Modification Tutorials

Reply
 
LinkBack Thread Tools
Old 04-18-2006, 06:14 PM   #11
tgreer
Guest

Default

Ok, I understand that new data must be "piped into" the datastore table. I was wondering if it was automatically updated via cron, etc. but that's not the case.

Also, there is no mechanism for placing data in the datastore and then having it automatically go back to the original data. So the lesson is: you have to do your queries as normal, and then update the datastore.

I still don't understand the magic of the specialtemplates array. Why must an entry be made in this array? When?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 04-21-2006, 06:11 AM   #12
Ken Iovino
Founder
Ken Iovino's Avatar
Join Date: Mar 2004
Real Name: Ken Iovino
Location: Miami, Florida
Ken Iovino is on a distinguished road

Default

Anytime your PHP file will need info from the datastore, you need to add the title in the array. This will then load only the nessary datastore info. For instance, there is no need to grab the attachmentcache from the datastore in the whosonline page, so we won't add "attachmentcache" to that array, and in return it won't try to grab unnessaray info from the datastore, making the main datastore query alittle less intense.
__________________
Earnersforum.com - Learn how to make money online! New Look!

Ken Iovino / vBHackers.com
vBSEO 3.1 GOLD Released vB Blogs Compatible | Non-Encrypted | Branding Removal Option | Sitemaps 2.1 | Language Packs

Crawlability Network: vBulletin SEO | vBulletin Hackers




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-21-2006, 01:49 PM   #13
vb.org @dministrator
Join Date: Apr 2006
Paul M is on a distinguished road

Default

Quote:
Originally Posted by tgreer
I still don't understand the magic of the specialtemplates array. Why must an entry be made in this array? When?
When global.php is called, some datastore items are always loaded - others are only loaded if an entry for them has been included in $specialtemplates. I have no idea why it's called $specialtemplates as it has nothing to do with templates at all, it would have been much less confusing to call the array $datastore or something.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-21-2006, 01:57 PM   #14
tgreer
Guest

Default

Thank you both, I believe you've clarified the matter.

1) Any database entries/records/tables etc. you create should ideally be placed in the datastore.

2) The time to do this is directly after your insert/update/delete query.

3) Prior to retrieving your data from the datastore, you must insert the relevant datastore record in the $specialtemplates array

4) The proper time to do this is... when? cache_templates? or global_start?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-21-2006, 06:17 PM   #15
Ken Iovino
Founder
Ken Iovino's Avatar
Join Date: Mar 2004
Real Name: Ken Iovino
Location: Miami, Florida
Ken Iovino is on a distinguished road

Default

as of right now there is no way to add your entry to the special templates array without manually adding them to the array. (hacking) This is becaus ethe array is called before global.php is loaded.Though you can use this in plugins to call your datastore items.

You must first be a registered member to view any code.
Though this will add one small query.
__________________
Earnersforum.com - Learn how to make money online! New Look!

Ken Iovino / vBHackers.com
vBSEO 3.1 GOLD Released vB Blogs Compatible | Non-Encrypted | Branding Removal Option | Sitemaps 2.1 | Language Packs

Crawlability Network: vBulletin SEO | vBulletin Hackers




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-21-2006, 06:59 PM   #16
tgreer
Guest

Default

And which file would you edit to add your datastore record to the $specialtemplates array?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-21-2006, 11:35 PM   #17
vb.org @dministrator
Join Date: Apr 2006
Paul M is on a distinguished road

Default

Quote:
Originally Posted by tgreer
1) Any database entries/records/tables etc. you create should ideally be placed in the datastore.

2) The time to do this is directly after your insert/update/delete query.

3) Prior to retrieving your data from the datastore, you must insert the relevant datastore record in the $specialtemplates array

4) The proper time to do this is... when? cache_templates? or global_start?
1. Not really, the datastore is just for global stuff you need to keep, that doesn't justify a table of it's own. I don't actually use it much.

2. The DS is not related to sql queries so I'm not sure what you mean here.

3. & 4. That has to be done before global.php is called - generally a file has to be edited.

The datastore is not all vb data - it's just a convienient way to store global settings or items - each datastore record is just a row in the datastore table, I assume you are aware of this ?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-22-2006, 12:47 AM   #18
tgreer
Guest

Default

Yes, I'm aware. My questions were in response to the original tutorial here, where it was recommended that plugins that required new tables for often-used data should use the datastore mechanism. I understand all of that, but not the role played by $specialtemplates.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-12-2006, 01:37 PM   #19
vBulletin Guru
Developer's Avatar
Join Date: Jan 2006
Real Name: Ahmed || Devo.
Location: Beside Sphinx, EgYpT
Developer is on a distinguished road

Default

it doesn't works with me
i made every thing but still not shown in datastore query




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-13-2006, 04:56 PM   #20
Ken Iovino
Founder
Ken Iovino's Avatar
Join Date: Mar 2004
Real Name: Ken Iovino
Location: Miami, Florida
Ken Iovino is on a distinguished road

Default

I saw you posting in the coders forum at vB.org. Looks like you have it situated. If not let me know what exacly doesn't work.
__________________
Earnersforum.com - Learn how to make money online! New Look!

Ken Iovino / vBHackers.com
vBSEO 3.1 GOLD Released vB Blogs Compatible | Non-Encrypted | Branding Removal Option | Sitemaps 2.1 | Language Packs

Crawlability Network: vBulletin SEO | vBulletin Hackers




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Install system updated Ken Iovino Announcements 7 11-17-2006 02:59 PM
Not Your Normal Marquee System Sezmar vBulletin 3.5 / 3.6 Hack Releases 22 09-19-2006 08:41 AM
[REQUEST] Rating System (Possibly by TouchingVirus or ShavedApe?) figure004 vBulletin Modification Requests 4 05-22-2005 04:14 PM


All times are GMT -3. The time now is 01:51 AM.


SEO by vBSEO 3.2.0 RC8 ©2008, Crawlability, Inc. (Patent Pending)