We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
- (void)saveMemoryCacheWithResponse:(CTURLResponse *)response serviceIdentifier:(NSString *)serviceIdentifier methodName:(NSString *)methodName cacheTime:(NSTimeInterval)cacheTime { if (response.originRequestParams && response.content && serviceIdentifier && methodName) { [self.memoryCacheCenter saveCacheWithResponse:response key:[self keyWithServiceIdentifier:serviceIdentifier methodName:methodName requestParams:response.originRequestParams] cacheTime:cacheTime]; } } 请求没有参数时,originRequestParams为空就没办法缓存了。处于什么考虑呢?
- (void)saveMemoryCacheWithResponse:(CTURLResponse *)response serviceIdentifier:(NSString *)serviceIdentifier methodName:(NSString *)methodName cacheTime:(NSTimeInterval)cacheTime { if (response.originRequestParams && response.content && serviceIdentifier && methodName) { [self.memoryCacheCenter saveCacheWithResponse:response key:[self keyWithServiceIdentifier:serviceIdentifier methodName:methodName requestParams:response.originRequestParams] cacheTime:cacheTime]; } }
originRequestParams
The text was updated successfully, but these errors were encountered:
这个主要是我当时的业务场景导致做了这样的决定,因为我们当时业务上那些没有参数的API都是不应该缓存的,它每次访问可能数据都不一样。
你可以按照你的业务场景来做调整。
Sorry, something went wrong.
No branches or pull requests
- (void)saveMemoryCacheWithResponse:(CTURLResponse *)response serviceIdentifier:(NSString *)serviceIdentifier methodName:(NSString *)methodName cacheTime:(NSTimeInterval)cacheTime { if (response.originRequestParams && response.content && serviceIdentifier && methodName) { [self.memoryCacheCenter saveCacheWithResponse:response key:[self keyWithServiceIdentifier:serviceIdentifier methodName:methodName requestParams:response.originRequestParams] cacheTime:cacheTime]; } }
请求没有参数时,
originRequestParams
为空就没办法缓存了。处于什么考虑呢?The text was updated successfully, but these errors were encountered: