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
In response to flungabunga:
Another way to implement grouping is to put the group name plus a sequence number into the keys themselves and increment the sequence number to "clear" the group. You store the current valid sequence number for each group in its own key.
e.g.
get seqno_mygroup
23
get mygroup23_mykey
get mygroup23_mykey2
Then to "delete" the group simply:
incr seqno_mygroup
Voila:
get seqno_mygroup
24
get mygroup24_mykey
...empty
etc..