Add query caching to models and string checksum generators