Initial implementation with very basic caching policy.

Not ready for production!