[wp-hackers] Use of ENGINE=MEMORY w/ dbDelta() possible?

DD32 wordpress at dd32.id.au
Mon Mar 24 03:43:42 GMT 2008


On Mon, 24 Mar 2008 14:31:14 +1100, Mahmoud Al-Qudsi <computerguru at neosmart.net> wrote:
> Am I missing any?
Not sure.

> My code's a bit different from yours... I'm saving a lot of queries by using a normal INSERT query with an ON DUPLICATE trigger instead of issuing a DELETE then an INSERT for each and every call. I'm not splitting up serialized data though, just base64_encode() and storing it as a varbinary (which is limited by bytes not chars) in the database. Haven't gotten around to implementing the expirations, not sure if there's a point though seeing just how much slower database-caching is in 2.5 thanks to the increase in the number of hooks.

To be fair, Its not my code, I just had it on the local drive, no idea where i got it from, i think it was posted to wp-hackers last year.

Expirations ARE needed, else the blog would continuously show the same data at that point in time, no changes afterwards.. WP only ever used 5minute expirations though, And some parts of the code (posting and commenting) delete the cached data too, but many things dont delete, just use if its cached.

ON DUPLICATE is a good way actually, I think it might be slower though, i'm not sure.

I'm not sure why your base64 encoding it though, surely that'd be slow? As long as its utf8, it should be able to store any characters you need, base64 encoding only adds extra overheads.
Also, Some caches can be VERY large, some only small, I think i remember some people having upwards of 50MB's in file caches just for the object cache.


Here, i pulled up the old thread for you:
http://groups.google.com/group/wp-hackers/browse_thread/thread/d8ca502a0d0e8fbd/3f3e5c442063d272?lnk=gst&q=memory+object+cache#3f3e5c442063d272


This post was just all AFAIK, i cant back anything up, Its all just from memory of the old discussion.


More information about the wp-hackers mailing list