#115 improved caching and autocommit