Moved queries caching to init method (avoid circular import)