implement hardware-caching, but very slow