[wp-hackers] Plugin best practices: wp_options and storing custom
wordpress at tekartist.org
Wed Apr 2 21:09:25 GMT 2008
I'm having to store static data for a plugin. To put it in context,
people can choose to embed the data from an API as dynamic (live api
or wp_cache lookup at page load) or as static (ie: snapshot in time of
an api record).
The usual practice is to have a custom table in the wp db (like
Twitter tools et al.), but I'm wondering what would happen during WP
upgrades and migrations.
Is the WP export / import scripts be taking these in consideration
when people are moving hosts, or will the tables be left behind? If
the latter, is the import/export tool hookable so we can instruct it
to also import/export our custom tables?
I could lookup the code, but I also have another related question:
Instead of having a custom table, and since the objects will be rather
lightweight, would it be a really bad idea to store them in wp_options
They'll all have a unique key, and I only need to query them one at a
time (ie, no search, lists, etc).
I'm just wondering if the wp_options avenue would lead to a global
slow down of the wp install in the long term, since the table is one
of the most accessed.
Thanks for your feedback,
Stephane Daury - http://tekartist.org/
More information about the wp-hackers