Result caching, updated mysql tables