mysql in-memory table as a cache?
I'm just curious if anyone has used this approach before.
I'm just curious if anyone has used this approach before.
If you're set on MySQL, assuming you are on Linux (or a similar platform) you should consider perhaps using BDB or MyISAM for your storage engine and just keeping the data on a ram disk. This will give you wicked fast reads.
However the memcached code path is pretty lean and will give you better performance than in-memory mysql for single key/value lookups.
You could use memcached. However, if you are developing REST web services, you can retrospectively introduce Squid without changing your code.
The problem with memcached is that I want to access the data sequentially, page by page. I can't seem to find a feasable way to store an ordered list (without really bad insert performance).