Hello,
Thank you so much for your tutorial. This was exactly what I was looking for. I write my own products/plugins (our forums is huge) and I was wondering how to cache stuff around.
However I faced one problem: I couldn't read data back.
The solution was to add a "1" parameter on the store command:
build_datastore('name',serialize($variable),1);
When retrieving you don't need to "unserialize" it.
Also I was trying to call my cached array inside a class that hasn't had $vbulletin as a global variable, so I needed to add:
global $vbulletin;
On the top of my plugin.
And I also needed to add a plugin for the init_startup hook, adding:
$datastore_fetch[]="'name'";
I hope this feedback helps other coders.
Cheers,
Gabriel.
|