Well, previously there was no caching on this, so this query was run every page load. While doing these changes I thought I'd add some caching. I chose 15 minutes so that there wasn't too much of a delay between when a SWM was sent and seen by anons. I could have cleared the cache when a message is sent, but as the cache entry is per wiki, I'd need another check to see if a new message was sent and I wanted to keep this simple since it's all going away.