add caching to CAPI