Revert "Use the cache in the library code"

This reverts commit 90d44f39023da4d964f05af118512a57ca70d2d2.
Revert "Add a caching implementation"

This reverts commit cda04afc9eb96d786c3f7eaf13ed7625edb538f3.