added tests for collections caching
fixed cursors for use in multi-database env