Implement database caching for web interface