added simple query caching + gc