Cursor class with built-in caching support
