Implemented stylus caching