implemented simple internal caching layer

see README.md for details