I’m curious about speeding up my site using memcache. Now currently I have a mysql table with columns for a key and email address, users log in using their key and I query the database to check if it’s correct. The email is used incase they forget their key and want it resending.
Now, obviously each record is very small (about 19B I think). Do you think it would be a good idea to preload all (Say, 1 million records) the records into Memcached and only use Mysql for keeping a permanent record?
Memcached is intended to be a short term caching solution handle key=value pairs. While you could, in theory, use it for something like this, it isn’t the intended use for it and honestly I don’t think you really gain anything for it.
Generally the best thing to use Memcached for is activities like dynamically generated content that you want to keep consistent along a session and accessible from multiple servers (Like an load balanced environment.