Add caching rules for api methods.