caching categories

Good idea to split this out.