simplified caching to use a single implementation