added expensive caching

option to use caching: see dataservlet function call. works for now, but
expensive to populate cache!