I\'ve created a forum, and we\'re implementing an apc and memcache caching solution to save the database some work.
I started implementing the cache layer with keys like
You're essentially trying to cache a view, which is always going to get tricky. You should instead try to cache data only, because data rarely changes. Don't cache a forum, cache the thread rows. Then your db call should just return a list of ids, which you already have in your cache. The db call will be lightening fast on any MyISAM table, and then you don't have to do a big join, which eats db memory.