web interface: refactor data access helpers to be more uniform and cache more