cursor class with built-in caching support
