Two changes to caching aggregations

This refactors the namespaces and documents them a bit better so that they make more sense.

This also fixes a major bug with large datasets being aggregated.