btw I might consider caching the result of this function in memcached, or maybe it's a micro-optimization that's not worth it